Delta Volume Candles [LucF]โโ OVERVIEW
This indicator plots on-chart volume delta information using candles that can replace your normal candles, tops and bottoms appended to normal candles, optional MAs of those tops and bottoms levels, a divergence channel and a chart background. The indicator calculates volume delta using intrabar analysis, meaning that it uses the lower timeframe bars constituting each chart bar.
โโ CONCEPTS
Volume Delta
โThe โvolume delta concept divides a bar's โvolume in "up" and "down" โvolumes. The delta is calculated by subtracting down โvolume from up โvolume. Many calculation techniques exist to isolate up and down โvolume within a bar. The simplest use the polarity of interbar price changes to assign their โvolume to up or down slots, e.g., On Balance Volume or the Klinger Oscillator . Others such as Chaikin Money Flow use assumptions based on a bar's OHLC values. The most precise calculation method uses tick data and assigns the โvolume of each tick to the up or down slot depending on whether the transaction occurs at the bid or ask price. While this technique is ideal, it requires huge amounts of data on historical bars, which considerably limits the historical depth of charts and the number of symbols for which tick data is available. Furthermore, historical tick data is not yet available on TradingView.
This indicator uses intrabar analysis to achieve a compromise between the simplest and most precise methods of calculating โvolume delta. It is currently the most precise method usable on TradingView charts. TradingView's Volume Profile built-in indicators use it, as do the CVD - Cumulative โVolume Delta Candles and CVD - Cumulative Volume Delta (Chart) indicators published from the TradingView account . My Delta Volume Channels and Volume Delta Columns Pro indicators also use intrabar analysis. Other โvolume delta indicators such as my Realtime 5D Profile use realtime chart updates to calculate volume delta without intrabar analysis, but that type of indicator only works in real time; they cannot calculate on historical bars.
This is the logic I use to determine the polarity of intrabars, which determines the up or down slot where its โvolume is added:
โโข If the intrabar's open and close values are different, their relative position is used.
โโข If the intrabar's open and close values are the same, the difference between the intrabar's close and the previous intrabar's close is used.
โโข As a last resort, when there is no movement during an intrabar, and it closes at the same price as the previous intrabar, the last known polarity is used.
Once all intrabars making up a chart bar have been analyzed and the up or down property of each intrabar's โvolume determined, the up volumes are added, and the down volumes subtracted. The resulting value is โvolume delta for that chart bar, which can be used as an estimate of the buying/selling pressure on an instrument. Not all markets have volume information. Without it, this indicator is useless.
Intrabar analysis
Intrabars are chart bars at a lower timeframe than the chart's. The timeframe used to access intrabars determines the number of intrabars accessible for each chart bar. On a 1H chart, each chart bar of an active market will, for example, usually contain 60 bars at the lower timeframe of 1min, provided there was market activity during each minute of the hour.
This indicator automatically calculates an appropriate lower timeframe using the chart's timeframe and the settings you use in the script's "Intrabars" section of the inputs. As it can access lower timeframes as small as seconds when available, the indicator can be used on charts at relatively small timeframes such as 1min, provided the market is active enough to produce bars at second timeframes.
The quantity of intrabars analyzed in each chart bar determines:
โโข The precision of calculations (more intrabars yield more precise results).
โโข The chart coverage of calculations (there is a 100K limit to the quantity of intrabars that can be analyzed on any chart,
โโso the more intrabars you analyze per chart bar, the less chart bars can be calculated by the indicator).
The information box displayed at the bottom right of the chart shows the lower timeframe used for intrabars, as well as the average number of intrabars detected for chart bars and statistics on chart coverage.
Balances
This indicator calculates five balances from volume delta values. The balances are oscillators with a zero centerline; positive values are bullish, and negative values are bearish. It is important to understand the balances as they can be used to:
โโข Color candle bodies.
โโข Calculate body and top and bottom divergences.
โโข Color an EMA channel.
โโข Color the chart's background.
โโข Configure markers and alerts.
The five balances are:
1 โ Bar Balance : This is the only balance using instant values; it is simply the subtraction of the down volumeโ from the up volumeโ on the bar, so the instant volume delta for that bar.
2 โ Average Balance : Calculates a distinct EMA for both the up and down volumes, and subtracts the down EMA from the up EMA.
โโThe result is akin to MACD's histogram because it is the subtraction of two moving averages.
3 โ Momentum Balance : Starts by calculating, separately for both up and down volumes, the difference between the same EMAs used in "Average Balance" and
โโan SMA of twice the period used for the "Average Balance" EMAs. The difference for the up side is subtracted from the difference for the down side,
โโand an RSI of that value is calculated and brought over the โ50/+50 scale.
4 โ Relative Balance : The reference values used in the calculation are the up and down EMAs used in the "Average Balance".
โโFrom those, we calculate two intermediate values using how much the instant up and down volumes on the bar exceed their respective EMAโโโbut with a twist.
โโIf the bar's up volumeโ does not exceed the EMA of up volumeโ, a zero value is used. The same goes for the down volumeโ with the EMA of down volumeโ.
โโOnce we have our two intermediate values for the up and down volumes exceeding their respective MA, we subtract them. The final value is an ALMA of that subtraction.
โโThe rationale behind using zero values when the bar's up/down volumeโ does not exceed its EMA is to only take into account the more significant volumeโ.
โโIf both instant volumeโ values exceed their MA, then the difference between the two is the signal's value.
โโThe signal is called "relative" because the intermediate values are the difference between the instant up/down volumes and their respective MA.
โโThis balance flatlines when the bar's up/down volumes do not exceed their EMAs, which makes it useful to spot areas where trader interest dwindles, such as consolidations.
โโThe smaller the period of the final value's ALMA, the more easily it will flatline. These flat zones should be considered no-trade zones.
5 โ Percent Balance : This balance is the ALMA of the ratio of the "Bar Balance" over the total volume for that bar.
From the balances and marker conditions, two more values are calculated:
1 โ Marker Bias : This sums the up/down (+1/โ1) occurrences of the markers 1 to 4 over a period you define, so it ranges from โ4 to +4, times the period.
โโIts calculation will depend on the modes used to calculate markers 3 and 4.
2 โ Combined Balances : This is the sum of the bull/bear (+1/โ1) states of each of the five balances, so it ranges from โ5 to +5.
The periods for all of these balances can be configured in the "Periods" section at the bottom of the script's inputs. As you cannot see the balances on the chart, you can use my Volume Delta Columns Pro indicator in a pane; it can plot the same balances, so you will be able to analyze them.
Divergences
In the context of this indicator, a divergence is any bar where the bear/bull state of a balance (above/below its zero centerline) diverges from the polarity of a chart bar. No directional bias is assigned to divergences when they occur. Candle bodies and tops/bottoms can each be colored differently on divergences detected from distinct balances.
Divergence Channel
The divergence channel is the space between two levels (by default, the bar's open and close ) saved when divergences occur. When price (by default the close ) has breached a channel and a new divergence occurs, a new channel is created. Until that new channel is breached, bars where additional divergences occur will expand the channel's levels if the bar's price points are outside the channel.
Prices breaches of the divergence channel will change its state. Divergence channels can be in one of three different states:
โโข Bull (green): Price has breached the channel to the upside.
โโข Bear (red): Price has breached the channel to the downside.
โโข Neutral (gray): The channel has not yet been breached.
โโ HOW TO USE THE INDICATOR
I do not make videos to explain how to use my indicators. I do, however, try hard to include in their description everything one needs to understand what they do. From there, it's up to you to explore and figure out if they can be useful in your trading practice. Communicating in videos what this description and the script's tooltips contain would make for very long videos that would likely exceed the attention span of most people who find this description too long. There is no quick way to understand an indicator such as this one because it uses many different concepts and has quite a bit of settings one can use to modify its visuals and behavior โ thus how one uses it. I will happily answer questions on the inner workings of the indicator, but I do not answer questions like "How do I trade using this indicator?" A useful answer to that question would require an in-depth analysis of who you are, your trading methodology and objectives, which I do not have time for. I do not teach trading.
Start by loading the indicator on an active chart containing volume information. See here if you need help.
The default configuration displays:
โโข Normal candles where the bodies are only colored if the bar's volume has increased since the last bar.
โโIf you want to use this indicator's candles, you may want to disable your chart's candles by clicking the eye icon to the right of the symbol's name in the top left of the chart.
โโข A top or bottom appended to the normal candles. It represents the difference between up and down volume for that bar
โโand is positioned at the top or bottom, depending on its polarity. If up volume is greater than down volume, a top is displayed. If down volume is greater, a bottom is plotted.
โโThe size of tops and bottoms is determined by calculating a factor which is the proportion of volume delta over the bar's total volume.
โโThat factor is then used to calculate the top or bottom size relative to a baseline of the average candle body size of the last 100 bars.
โโข An information box in the bottom right displaying intrabar and chart coverage information.
โโข A light red background when the intrabar volume differs from the chart's volume by more than 1%.
The script's inputs contain tooltips explaining most of the fields. I will not repeat them here. Following is a brief description of each section of the indicator's inputs which will give you an idea of what the indicator can do:
Normal Candles is where you configure the replacement candles plotted by the script. You can choose from different coloring schemes for their bodies and specify a unique color for bodies where a divergence calculated using the method you choose occurs.
Volume Tops & Botttoms is where you configure the display of tops and bottoms, and their EMAs. The EMAs are calculated from the high point of tops and the low point of bottoms. They can act as a channel to evaluate price, and you can choose to color the channel using a gradient reflecting the advances/declines in the balance of your choice.
Divergence Channel is where you set up the appearance and behavior of the divergence channel. These areas represent levels where price and volume delta information do not converge. They can be interpreted as regions with no clear direction from where one will look for breaches. You can configure the channel to take into account one or both types of divergences you have configured for candle bodies and tops/bottoms.
Background allows you to configure a gradient background color that reflects the advances/declines in the balance of your choice. You can use this to provide context to the volume delta values from bars. You can also control the background color displayed on volume discrepancies between the intrabar and the chart's timeframe.
Intrabars is where you choose the calculation mode determining the lower timeframe used to access intrabars. The indicator uses the chart's timeframe and the type of market you are on to calculate the lower timeframe. Your setting there should reflect which compromise you prefer between the precision of calculations and chart coverage. This is also where you control the display of the information box in the lower right corner of the chart.
Markers allows you to control the plotting of chart markers on different conditions. Their configuration determines when alerts generated from the indicator will fire. Note that in order to generate alerts from this script, they must be created from your chart. See this Help Center page to learn how. Only the last 500 markers will be visible on the chart, but this will not affect the generation of alerts.
Periods is where you configure the periods for the balances and the EMAs used in the indicator.
The raw values calculated by this script can be inspected using the Data Window.
โโ INTERPRETATION
Rightly or wrongly, volume delta is considered by many a useful complement to the interpretation of price action. I use it extensively in an attempt to find convergence between my read of volume delta and price movement โ not so much as a predictor of future price movement. No system or person can predict the future. Accordingly, I consider people who speak or act as if they know the future with certainty to be dangerous to themselves and others; they are charlatans, imprudent or blissfully ignorant.
I try to avoid elaborate volume delta interpretation schemes involving too many variables and prefer to keep things simple:
โโข Trends that have more chances of continuing should be accompanied by VD of the same polarity.
โโIn trends, I am looking for "slow and steady". I work from the assumption that traders and systems often overreact, which translates into unproductive volatility.
โโWild trends are more susceptible to overreactions.
โโข I prefer steady VD values over wildly increasing ones, as large VD increases often come with increased price volatility, which can backfire.
โโLarge VD values caused by stopping volume will also often occur on trend reversals with abnormally high candles.
โโข Prices escaping divergence channels may be leading a trend in that direction, although there is no telling how long that trend will last; could be just a few bars or hundreds.
โโWhen price is in a channel, shifts in VD balances can sometimes give us an idea of the direction where price has the most chance of breaking.
โโข Dwindling VD will often indicate trend exhaustion and predate reversals by many bars, but the problem is that mere pauses in a trend will often produce the same behavior in VD.
โโI think it is too perilous to infer rigidly from VD decreases.
Divergence Channel
Here I have configured the divergence channels to be visible. First, I set the bodies to display divergences on the default Bar Balance. They are indicated by yellow bodies. Then I activated the divergence channels by choosing to draw levels on body divergences and checked the "Fill" checkbox to fill the channel with the same color as the levels. The divergence channel is best understood as a direction-less area from where a breach can be acted on if other variables converge with the breach's direction:
Tops and Bottoms EMAs
I find these EMAs rather interesting. They have no equivalent elsewhere, as they are calculated from the top and bottom values this indicator plots. The only similarity they have with volume-weighted MAs, including VWAP, is that they use price and volume. This indicator's Tops and Bottoms EMAs, however, use the price and volume delta. While the channel differs from other channels in how it is calculated, it can be used like others, as a baseline from which to evaluate price movement or, alternatively, as stop levels. Remember that you can change the period used for the EMAs in the "Periods" section of the inputs.
This chart shows the EMAs in action, filled with a gradient representing the advances/decline from the Momentum balance. Notice the anomaly in the chart's latest bars where the Momentum balance gradient has been indicating a bullish bias for some time, during which price was mostly below the EMAs. Price has just broken above the channel on positive VD. My interpretation of this situation would be that it is a risky opportunity for a long trade in the larger context where the market has been in a downtrend since the 5th. Intrepid traders choosing to enter here could do so with a "make or break" tight stop that will minimize their losses should the market continue its downtrend while hopefully preserving the potential upside of price continuing on the longer-term uptrend prevalent since the 28th:
โโ NOTES
Volume
If you use indicators such as this one which depends on volume information, it is important to realize that the volume data they consume comes from data feeds, and that all data feeds are NOT created equally. Those who create the data feeds we use must make decisions concerning the nature of the transactions they tally and the way they are tallied in each feed, and these decisions affect the nature of our volume data. My Volume X-ray publication discusses some of the reasons why volume information from different timeframes, brokers/exchanges or sectors may vary considerably. I encourage you to read it. This indicator's display of a warning through a background color on volume discrepancies between the timeframe used to access intrabars and the chart's timeframe is an attempt to help you realize these variations in feeds. Don't take things for granted, and understand that the quality of a given feed's volume information affects the quality of the results this indicator calculates.
Markets as ecosystems
I believe it is perilous to think that behavioral patterns you discover in one market through the lens of this or any other indicator will necessarily port to other markets. While this may sometimes be the case, it will often not. Why is that? Because each market is its own ecosystem. As cities do, all markets share some common characteristics, but they also all have their idiosyncrasies. A proportion of a city's inhabitants is always composed of outsiders who come and go, but a core population of regulars and systems is usually the force that actually defines most of the city's observable characteristics. I believe markets work somewhat the same way; they may look the same, but if you live there for a while and pay attention, you will notice the idiosyncrasies. Some things that work in some markets will, accordingly, not work in others. Please keep that in mind when you draw conclusions.
On Up/Down or Buy/Sell Volume
Buying or selling volume are misnomers, as every unit of volume transacted is both bought and sold by two different traders. While this does not keep me from using the terms, there is no such thing as โbuy onlyโ or โsell onlyโ volume. Trader lingo is riddled with peculiarities. Without access to order book information, traders work with the assumption that when price moves up during a bar, there was more buying pressure than selling pressure, just as when buy market orders take out limit ask orders in the order book at successively higher levels. The built-in volume indicator available on TradingView uses this logic to color the volume columns green or red. While this scriptโs calculations are more precise because it analyses intrabars to calculate its information, it uses pretty much the same imperfect logic. Until Pine scripts can have access to how much volume was transacted at the bid/ask prices, our volume delta calculations will remain a mere proxy.
Repainting
โโข The values calculated on the realtime bar will update as new information comes from the feed.
โโข Historical values may recalculate if the historical feed is updated or when calculations start from a new point in history.
โโข Markers and alerts will not repaint as they only occur on a bar's close. Keep this in mind when viewing markers on historical bars,
โโwhere one could understandably and incorrectly assume they appear at the bar's open.
To learn more about repainting, see the Pine Scriptโข User Manual's page on the subject .
Superfluity
In "The Bed of Procrustes", Nassim Nicholas Taleb writes: To bankrupt a fool, give him information . This indicator can display a lot of information. The inevitable adaptation period you will need to figure out how to use it should help you eliminate all the visuals you do not need. The more you eliminate, the easier it will be to focus on those that are the most useful to your trading practice. Don't be a fool.
โโ THANKS
Thanks to alexgrover for his Dekidaka-Ashi indicator. His volume plots on candles were the inspiration for my top/bottom plots.
Kudos to PineCoders for their libraries. I use two of them in this script: Time and lower_tf .
The first versions of this script used functionality that I would not have known about were it not for these two guys:
โ A guy called Kuan who commented on a Backtest Rookies presentation of their Volume Profile indicator.
โ theheirophant , my partner in the exploration of the sometimes weird abysses of request.security() โs behavior at lower timeframes.
Search in scripts for "Up down"
APEX - Aroon / Aroon Oscillator [v1]Simple Script that combines Aroon and Aroon Oscillator with MTF functionality for APEX.
Aroon
The Aroon also know as Aroon Up/Down will help you determine the trend of the asset of if the asset is ranging. The indicator consists of two lines the AroonDown and the Aroon Up.When Aroon Up reaches 100, a new uptrend may have begun. If it remains persistently between 70 and 100, and the Aroon-Down remains between 0 and 30, then a new uptrend is underway.If the Aroon-Up crosses above the Aroon-Down, then a new uptrend may start soon. Conversely, if Aroon-Down crosses above the Aroon-Up, then a new downtrend may start soon. When Aroon-Up reaches 100, a new uptrend may have begun. If it remains persistently between 70 and 100, and the Aroon-Down remains between 0 and 30, then a new uptrend is underway.
Aroon Oscillator
The Aroon Oscillator is the difference between Aroon-Up and Aroon-Down. These two indicators are usually plotted together for easy comparison, but chartists can also view the difference between these two indicators with the Aroon Oscillator. This indicator fluctuates between -100 and +100 with zero as the middle line. An upward trend bias is present when the oscillator is positive, while a downward trend bias exists when the oscillator is negative.
Kinetic Scalper [BULLBYTE]KINETIC SCALPER - ADVANCED MOMENTUM & CONFLUENCE TRADING SYSTEM
A SOPHISTICATED MULTI-FACTOR ANALYSIS INDICATOR FOR PRECISION ENTRIES
The Kinetic Scalper is a comprehensive trading analysis tool that combines volume-weighted momentum calculations, multi-oscillator divergence detection, and a proprietary 15-factor confluence scoring system to identify high-probability reversal setups across all timeframes.
WHAT MAKES THIS INDICATOR ORIGINAL
This is NOT a simple mashup of existing indicators.
The Kinetic Scalper features a completely custom momentum engine called the "Kinetic Pulse" - a volume-weighted momentum oscillator with Fisher Transform normalization that fundamentally differs from standard RSI or other momentum indicators. Every component feeds into a unified algorithmic framework designed specifically for this system.
KEY INNOVATIONS:
KINETIC PULSE ENGINE
Unlike standard RSI which uses simple price changes, the Kinetic Pulse applies:
โ Volume weighting to price movements (high-volume moves carry more weight)
โ EMA smoothing instead of traditional SMA (faster response to changes)
โ Fisher Transform normalization for improved signal clarity
โ Adaptive period adjustment based on current volatility regime
โ Result: A momentum oscillator that responds to conviction, not just price noise
15-FACTOR CONFLUENCE SCORING SYSTEM
Every signal is graded based on the number of confirming factors present:
โ Momentum position (oversold/overbought extremes)
โ Momentum velocity (direction change confirmation)
โ Momentum acceleration (strength of reversal)
โ Multi-oscillator divergence (price vs. 3 oscillators)
โ Volume confirmation (above-average participation)
โ Volume delta analysis (buying vs. selling pressure)
โ Higher timeframe alignment (trend confirmation from larger timeframe)
โ Session timing (major forex session awareness)
โ Structure clearance (clear path to profit targets)
โ Support/resistance proximity (confluence with key levels)
โ Market regime filtering (trending vs. choppy conditions)
Signals are graded A+, A, or B based on how many factors align:
โข CONSERVATIVE MODE: A+ requires 12+ factors, A requires 9+, B requires 7+
โข BALANCED MODE: A+ requires 10+ factors, A requires 7+, B requires 5+
โข AGGRESSIVE MODE: A+ requires 8+ factors, A requires 5+, B requires 3+
TRADE ANALYSIS STATE MACHINE
A sophisticated monitoring system that tracks trade conditions in real-time using:
โ 5-state analysis framework (Factors Aligned / Positive Bias / Mixed Signals / Factors Weakening / Negative Bias)
โ Hysteresis-based transitions (different thresholds to enter vs. exit states)
โ Confidence smoothing with EMA (reduces noise, prevents flip-flopping)
โ Minimum commitment periods before state changes
โ Override logic for significant events (near TP/SL, momentum reversals)
โ Result: Stable, actionable guidance that doesn't change on every bar
INSTRUMENT-AWARE CALIBRATION
Automatically detects what you're trading and applies optimized parameters:
โ Forex Majors: Standard ATR, high session weight
โ Forex Crosses: Tighter stops, moderate session weight
โ Crypto: Wider stops (1.8x multiplier), reduced session weight (24/7 markets)
โ Indices: Moderate-wide stops, high session weight
โ Commodities: Moderate stops, moderate session weight
WHAT THIS INDICATOR DOES
The Kinetic Scalper is designed to identify high-confluence reversal opportunities by analyzing multiple dimensions of market behavior simultaneously.
CORE FUNCTIONS:
1. SIGNAL GENERATION
โ Identifies potential reversal points at oversold/overbought extremes
โ Confirms with multi-oscillator divergence detection
โ Validates with volume, higher timeframe, and structural analysis
โ Filters out low-probability setups automatically
โ Grades signals based on total confluence factors present
2. AUTOMATED TRADE TRACKING
โ Calculates structure-based or ATR-based stop loss levels
โ Projects take profit targets using risk-to-reward ratios
โ Monitors live position status (P/L, distance to targets, R-multiple)
โ Tracks TP1 and TP2 hits automatically
โ Displays outcome markers (TP HIT, PARTIAL WIN, STOPPED)
3. REAL-TIME CONDITION MONITORING
โ Analyzes 6 factor categories during active trades
โ Provides confidence scoring (0-100 scale)
โ Generates actionable guidance based on current market state
โ Alerts when conditions deteriorate or improve
โ Helps with trade management decisions
4. COMPREHENSIVE MARKET ANALYSIS
โ Session detection (Asian, London, New York, Overlap)
โ Volatility regime identification (Low, Normal, High, Extreme)
โ Trend state classification (Trending Up/Down, Ranging, Transitioning)
โ Volume analysis (relative volume and delta approximation)
โ Choppiness filtering (blocks signals in ranging markets)
WHY USE THIS INDICATOR
PROBLEM: Most momentum indicators generate too many false signals at extremes.
SOLUTION: The Kinetic Scalper requires MULTIPLE confirming factors before generating a signal, dramatically reducing noise and focusing on high-confluence setups.
ADVANTAGES:
โ QUALITY OVER QUANTITY
โ Signal grading ensures you can filter for only the highest-quality setups
โ A+ signals have 10-12+ confirming factors aligned
โ Cooldown periods prevent over-trading the same move
โ COMPLETE TRADE FRAMEWORK
โ Entry signals with confluence justification
โ Calculated stop loss based on market structure or ATR
โ Two profit targets with clear risk-to-reward ratios
โ Live trade monitoring with factor analysis
โ Outcome tracking and visual markers
โ ADAPTIVE TO MARKET CONDITIONS
โ Volatility-based period adjustment for momentum calculations
โ Instrument-specific ATR multipliers
โ Session awareness for forex traders
โ Higher timeframe trend filtering
โ Automatic regime detection (trending vs. choppy)
โ TRANSPARENT METHODOLOGY
โ Every input has detailed tooltips explaining its purpose
โ Signal tooltips show exactly why a signal was generated
โ Dashboard displays all relevant market conditions
โ Factor scores are visible during trades
โ No "black box" mystery calculations
โ NON-REPAINTING & RELIABLE
โ All signals use barstate.isconfirmed (only on closed bars)
โ Higher timeframe data uses lookahead_off with historical offset
โ No future data access or repainting behavior
โ What you see is what you get - signals don't disappear or move
HOW THE INDICATOR WORKS
SIGNAL GENERATION PROCESS:
STEP 1: MOMENTUM ANALYSIS
The Kinetic Pulse engine calculates volume-weighted momentum:
โ Price changes are weighted by volume ratio vs. 20-bar average
โ High-volume moves have more influence on the oscillator
โ Gains and losses are smoothed using EMA (not SMA like RSI)
โ Fisher Transform is applied for normalization to 0-100 scale
โ Result: Momentum reading that emphasizes conviction, not noise
STEP 2: REVERSAL DETECTION
The indicator looks for potential reversal conditions:
โ Kinetic Pulse reaching oversold zone (below dynamic lower threshold)
โ Momentum velocity turning positive after being negative (for longs)
โ OR bullish divergence detected on multiple oscillators
โ Price making lower lows while oscillators make higher lows = divergence
STEP 3: MULTI-OSCILLATOR DIVERGENCE CONFIRMATION
Divergence is validated across three sources:
โ Kinetic Pulse divergence
โ CCI divergence
โ Stochastic divergence
โ Multiple oscillators confirming divergence increases signal reliability
STEP 4: CONFLUENCE FACTOR SCORING
The system evaluates all 15 possible confirming factors:
โ Momentum position: Is pulse oversold/overbought? (+0 to +2 points)
โ Momentum direction: Is velocity reversing? (+0 to +2 points)
โ Momentum acceleration: Is reversal strengthening? (+0 to +1 point)
โ Divergence count: How many oscillators show divergence? (+0 to +2 points)
โ Volume strength: Is volume above 1.3x average? (+0 to +1 point)
โ Volume delta: Is cumulative delta positive/negative? (+0 to +1 point)
โ HTF alignment: Does higher timeframe support direction? (+0 to +2 points)
โ Session timing: Is it a prime trading session? (+0 to +1 point)
โ Clear air: Is path to targets clear of obstacles? (+0 to +1 point)
โ Structure confluence: Are we near support/resistance? (+0 to +1 point)
โ Market regime: Is market trending, not choppy? (+0 to +1 point)
Total possible score: 15 points
Minimum for signal: 3-12 points depending on sensitivity mode
STEP 5: FILTER VALIDATION
Before generating a signal, additional checks are performed:
โ Volume must be above minimum threshold (if filter enabled)
โ Higher timeframe must not oppose the signal direction (if filter enabled)
โ Target path must be clear of major resistance/support (if filter enabled)
โ Volatility must not be EXTREME (blocks signals in chaos)
โ Risk-to-reward ratio must meet minimum requirement
โ Cooldown period must have elapsed since last signal
STEP 6: SIGNAL GRADING
If all filters pass, the signal is graded based on score:
โ A+ Grade: Highest confluence (8-12+ factors depending on sensitivity)
โ A Grade: High confluence (5-9+ factors)
โ B Grade: Moderate confluence (3-7+ factors)
Only graded signals (A+, A, or B) are displayed.
STEP 7: TRADE LEVEL CALCULATION
Stop loss and targets are calculated automatically:
STOP LOSS METHODS:
โข Structure-Based: Uses recent swing low/high with ATR buffer, constrained by min/max ATR limits
โข ATR-Based: Pure ATR multiplier with min/max constraints
โข Fixed ATR: Simple ATR multiplier, no adjustments
TARGET CALCULATION:
โข TP1: Entry ยฑ (Stop Distance ร Target 1 R:R)
โข TP2: Entry ยฑ (Stop Distance ร Target 2 R:R)
โข Default: TP1 at 1.0 R:R (1:1), TP2 at 2.0 R:R (1:2)
STEP 8: TRADE MONITORING
Once a signal is taken, the indicator tracks:
โ Current P/L in ticks and R-multiples
โ Distance to each target in ATR units
โ Distance to stop loss in ATR units
โ TP1 hit detection (marks with label, updates lines)
โ TP2 hit detection (closes trade, marks outcome)
โ Stop loss hit detection (closes trade, differentiates partial vs. full loss)
STEP 9: FACTOR ANALYSIS (DURING TRADES)
The Trade Analysis Panel monitors 6 key factor categories:
โ Momentum: Is momentum still aligned with trade direction? (-15 to +15 pts)
โ Position: Current R-multiple position (-12 to +12 pts)
โ Volume: Is volume still supportive? (-6 to +6 pts)
โ HTF Alignment: Does HTF still support trade? (-6 to +8 pts)
โ Target Proximity: How close are we to targets? (0 to +10 pts)
โ Stop Proximity: Are we dangerously close to stop? (-15 to +3 pts)
Raw scores are summed and smoothed using 5-bar EMA to create Confidence Score (0-100).
STEP 10: STATE MACHINE TRANSITIONS
Based on smoothed confidence, the system transitions between 5 states:
โ FACTORS ALIGNED (72+): Everything looks good
โ POSITIVE BIAS (58-72): Conditions favorable
โ MIXED SIGNALS (48-58): Neutral conditions
โ FACTORS WEAKENING (22-48): Concerning signals
โ NEGATIVE BIAS (<22): Poor conditions
Hysteresis prevents rapid flipping between states (different entry/exit thresholds).
RECOMMENDED TIMEFRAMES & INSTRUMENTS
TIMEFRAME VERSATILITY:
Despite the name "Scalper," this indicator works on ALL timeframes:
โ LOWER TIMEFRAMES (1m - 15m)
โ Ideal for: Scalping and very short-term trades
โ Expect: More signals, faster trades, requires active monitoring
โ Best for: Forex majors, liquid crypto pairs
โ Tip: Use Conservative sensitivity to reduce noise
โ MID TIMEFRAMES (15m - 1H)
โ Ideal for: Intraday trading and day trading
โ Expect: Moderate signal frequency, 1-4 hour trade duration
โ Best for: Forex, indices, major crypto
โ Tip: Balanced sensitivity works well here
โ HIGHER TIMEFRAMES (4H - Daily)
โ Ideal for: Swing trading and position trading
โ Expect: Fewer signals, higher-quality setups, multi-day trades
โ Best for: All instruments
โ Tip: Can use Aggressive sensitivity for more opportunities
INSTRUMENT COMPATIBILITY:
โ FOREX MAJORS (EUR/USD, GBP/USD, USD/JPY, etc.)
โ Auto-detected or manually select "Forex Major"
โ Session filtering is highly valuable here
โ London/NY overlap generates best signals
โ FOREX CROSSES (EUR/GBP, AUD/NZD, etc.)
โ Auto-detected or manually select "Forex Cross"
โ Slightly tighter stops applied automatically
โ Session weight reduced vs. majors
โ CRYPTOCURRENCIES (BTC, ETH, SOL, etc.)
โ Auto-detected or manually select "Crypto"
โ Wider stops (1.8x multiplier) due to volatility
โ Session filtering less relevant (24/7 markets)
โ Works well on both spot and perpetual futures
โ INDICES (S&P 500, NASDAQ, DAX, etc.)
โ Auto-detected or manually select "Index"
โ Session opens (NY, London) are important
โ Moderate stop widths applied
โ COMMODITIES (Gold, Silver, Oil, etc.)
โ Auto-detected or manually select "Commodity"
โ Moderate stops and session awareness
โ Works well on both spot and futures
VISUAL ELEMENTS EXPLAINED
SIGNAL MARKERS:
The indicator offers 3 display styles (choose in settings):
โข PREMIUM STYLE (Default)
โ Signal appears below/above candles with connecting line
โ Background panel with grade badge (LONG , SHORT , etc.)
โ Entry price displayed
โ Direction arrow pointing to entry candle
โ Most informative, best for detailed analysis
โข MINIMAL STYLE
โ Simple dot marker with grade text next to it
โ Clean, unobtrusive design
โ Best for mobile devices or cluttered charts
โ Less visual noise
โข CLASSIC STYLE
โ Diamond marker with grade badge below/above
โ Traditional indicator aesthetic
โ Good balance between info and simplicity
ALL STYLES INCLUDE:
โ Signal tooltips with complete trade plan details
โ Grade display (A+, A, or B)
โ Color coding (bright colors for A+, standard for A/B)
SIGNAL TOOLTIP CONTENTS:
When you hover over any signal marker, you'll see:
โ Signal direction and grade
โ Confluence score (actual points vs. required)
โ Reason for signal (divergence type, reversal pattern)
โ Complete trade plan (Entry, Stop, TP1, TP2)
โ Risk in ticks
โ Risk-to-reward ratios
โ Market conditions at signal (Pulse value, HTF status, Volume, Session)
TRADE LEVEL LINES:
When Trade Tracking is enabled:
โข ENTRY LINE (Yellow/Gold)
โ Solid horizontal line at entry price
โ Shaded zone around entry (ยฑATR buffer)
โ Label showing entry price
โ Extends 20-25 bars into future
โข STOP LOSS LINE (Orange/Red)
โ Dashed line at stop level
โ Label showing stop price and distance in ticks
โ Turns dotted and changes color after TP1 hit (breakeven implied)
โ Deleted when trade closes
โข TAKE PROFIT 1 LINE (Blue)
โ Dotted line at TP1 level
โ Label showing price and R:R ratio (e.g., "1:1.0")
โ Turns solid and changes to green when hit
โ Deleted after TP1 hit
โข TAKE PROFIT 2 LINE (Blue)
โ Solid line at TP2 level
โ Label showing price and R:R ratio (e.g., "1:2.0")
โ This is the "full win" target
โ Deleted when trade closes
OUTCOME MARKERS:
When trade milestones are reached:
โข - Green label appears when first target is touched
โข - Green label when second target is touched (trade complete)
โข - Red label if stop loss hit before any target
โข - Orange label if TP1 hit but then stopped out
PREVIOUS DAY LEVELS:
If enabled (Show Previous Day Levels):
โข PDH (Previous Day High) - Solid red/orange line
โ Label shows "PDH: "
โ Useful resistance reference for intraday trading
โข PDL (Previous Day Low) - Solid green line
โ Label shows "PDL: "
โ Useful support reference for intraday trading
BACKGROUND TINTS:
Subtle background colors indicate states:
โ Light green tint: Active long position being tracked
โ Light red tint: Active short position being tracked
โ Light orange tint: Extreme volatility warning (signals blocked)
DASHBOARD GUIDE
The indicator features TWO dashboard panels:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
MAIN DASHBOARD (Top Right by default)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
WHEN NO TRADE IS ACTIVE:
โ Bias: Current market bias (BULLISH, BEARISH, NEUTRAL, LEAN LONG/SHORT)
โ Based on Kinetic Pulse position and velocity
โ Helps you understand overall momentum direction
โ Pulse: Current Kinetic Pulse value (0-100 scale)
โ <30 = Oversold (potential long setups developing)
โ >70 = Overbought (potential short setups developing)
โ 40-60 = Neutral zone
โ Volatility: Current volatility regime (LOW, NORMAL, HIGH, EXTREME)
โ Calculated from ATR ratio vs. 100-period average
โ EXTREME volatility blocks all signals (too chaotic)
โ Trend: Market state classification
โ TREND UP / TREND DOWN: ADX > 25, directional movement clear
โ RANGING: ADX < 20, choppy conditions
โ TRANSITIONING: ADX 20-25, developing conditions
โ VOLATILE: Extreme ATR regime
โ Session: Current forex session
โ ASIAN (00:00-08:00 UTC)
โ LONDON (07:00-16:00 UTC)
โ NEW YORK (13:00-22:00 UTC)
โ LDN/NY (13:00-16:00 UTC) - Overlap period, highest volatility
โ OFF-HOURS: Outside major sessions
โ Volume: Current volume vs. 20-bar average
โ Displayed as multiplier (e.g., "1.45x" = 45% above average)
โ Green if >1.3x (high volume, bullish for signal quality)
โ Red if <0.8x (low volume, bearish for signal quality)
โ HTF: Higher timeframe analysis status
โ BULLISH: HTF momentum supports longs
โ BEARISH: HTF momentum supports shorts
โ NEUTRAL: No clear HTF direction
โ Best Score: Highest confluence score currently available
โ Shows both long and short scores
โ Format: " / "
โ Example: "8/7 " means long score is 8, threshold is 7, long is leading
โ Helps you anticipate which direction might signal next
โ PDH/PDL: Previous day high and low prices
โ Quick reference for intraday support/resistance
WHEN TRADE IS ACTIVE:
โ Trade: Direction and grade (e.g., "LONG ")
โ Entry: Entry price of current trade
โ P/L: Current profit/loss
โ Shown in ticks and R-multiples
โ Format: "+45 | +0.75R" or "-20 | -0.35R"
โ Green when positive, red when negative
โ TP1: First target status
โ Shows price and distance if not hit
โ Shows "HIT" in green if reached
โ TP2: Second target price and distance
โ Stop: Stop loss price and current distance from stop
โ Bars: Number of bars since entry (trade duration)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
TRADE ANALYSIS PANEL (Bottom Left by default)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
This panel provides algorithmic analysis of market conditions. It does NOT provide investment advice or recommendations.
WHEN NO TRADE IS ACTIVE:
Shows scanning status and signal readiness:
โ Long/Short Readiness Gauges
โ Visual bar showing proximity to signal threshold
โ Score display (e.g., "8/7" means 8 points scored, 7 needed)
โ "RDY" indicator when threshold reached
โ Status Messages
โ "Scanning for setups..." - Normal scanning mode
โ "Long setup ready - cooldown: X bars" - Signal qualified but in cooldown
โ "Oversold conditions - watch for reversal" - Setup developing
โ "Choppy conditions detected" - Warning about market state
โ "Extreme volatility - signals blocked" - Safety filter active
WHEN TRADE IS ACTIVE:
Header shows current analysis state:
โ FACTORS ALIGNED (Green) - Everything looks good, confidence 72+
โ POSITIVE BIAS (Light Green) - Conditions favorable, confidence 58-72
โ MIXED SIGNALS (Blue) - Neutral conditions, confidence 48-58
โ FACTORS WEAKENING (Orange) - Concerning signals, confidence 22-48
โ NEGATIVE BIAS (Red) - Poor conditions, confidence <22
Confidence Score:
โ Displayed as percentage (0-100%)
โ Visual gauge (|||||.....)
โ Trend indicator (Rising, Falling, Stable)
โ Shows momentum of confidence change
Factor Breakdown (if enabled):
Shows 6 factor categories with individual scores:
โ Momentum: Is momentum aligned with trade? (-15 to +15 points)
โ Positive if velocity matches trade direction
โ Negative if momentum opposes trade
โ Position: Current R-multiple analysis (-12 to +12 points)
โ Positive if trade is in profit
โ Negative if underwater
โ Score increases as profit grows
โ Volume: Is volume supportive? (-6 to +6 points)
โ Positive if volume above average
โ Negative if volume weak
โ HTF Align: Higher timeframe status (-6 to +8 points)
โ Positive if HTF still supports trade direction
โ Negative if HTF turned against trade
โ Target: Proximity to profit targets (0 to +10 points)
โ Higher score when approaching targets
โ Bonus if TP1 already hit and near TP2
โ Stop Dist: Distance from stop loss (-15 to +3 points)
โ Negative if dangerously close to stop (<0.3 ATR)
โ Positive if well away from stop (>1.5 ATR)
Each factor shows:
โข Score value with +/- indicator
โข Trend symbol: + (improving), - (deteriorating), = (stable)
โข Visual gauge
Guidance Messages:
โ "TARGET 2 APPROACHING" - TP2 within 0.3 ATR
โ "TARGET 1 APPROACHING" - TP1 within 0.3 ATR
โ "STOP PROXIMITY WARNING" - Stop within 0.3 ATR
โ "Factors aligned - Holding" - Positive state, stay in trade
โ "Conditions favorable" - Still looking good
โ "Conditions mixed - " - Neutral assessment
โ "Factors deteriorating" - Warning of weakening setup
โ "Confluence weakening - secure gains" - Consider exit if profitable
COMPACT MODE (Mobile-Friendly):
โ Reduces panel size by showing only essential info
โ Factor icons instead of full breakdowns
โ Simplified guidance messages
โ Perfect for smaller screens
SETTINGS GUIDE
MASTER SETTINGS:
Instrument Type
โ Purpose: Optimizes ATR multipliers and session weights for your asset
โ Options: Auto-Detect (recommended), Forex Major, Forex Cross, Crypto, Index, Commodity
โ Default: Auto-Detect
โ When to change: If auto-detection is incorrect for your symbol
Signal Sensitivity
โ Purpose: Controls how many factors required before generating signals
โ Options:
โข Conservative: Requires 12+ for A+, 9+ for A, 7+ for B (fewer, highest quality)
โข Balanced: Requires 10+ for A+, 7+ for A, 5+ for B (recommended)
โข Aggressive: Requires 8+ for A+, 5+ for A, 3+ for B (more frequent)
โ Default: Balanced
โ When to change: If you want fewer signals (Conservative) or more opportunities (Aggressive)
Enable Trade Signals
โ Purpose: Master on/off switch for signal generation
โ Default: ON
โ When to disable: If you only want to use the analysis dashboards without signals
Enable Trade Tracking
โ Purpose: Tracks active trades and monitors conditions until TP/SL hit
โ Default: ON
โ When to disable: If you manage trades manually and don't want automatic tracking
Show Entry/Stop/Target Levels
โ Purpose: Displays trade plan lines and labels on chart
โ Default: ON
โ When to disable: If you prefer clean charts or manage levels yourself
DISPLAY SETTINGS:
Color Theme
โ Purpose: Optimizes colors for your chart background
โ Options: Dark (for dark charts), Light (for light charts)
โ Default: Dark
Signal Display Style
โ Purpose: Visual style of signal markers
โ Options:
โข Premium: Badge with line and background panel (most detailed)
โข Minimal: Simple dot with grade text (cleanest)
โข Classic: Diamond marker with badge (traditional)
โ Default: Premium
Signal Distance
โ Purpose: How far signal labels appear from price bars (in ATR units)
โ Range: 0.5 to 10.0
โ Default: 2.0
โ When to adjust: Increase to 3.0-4.0 if signals hide behind candle wicks
TP/SL Label Distance
โ Purpose: Spacing of price labels to prevent overlap
โ Range: 0.5 to 5.0
โ Default: 1.5
Show Previous Day Levels
โ Purpose: Display PDH/PDL reference lines
โ Default: ON
โ Best for: Intraday traders who respect previous day levels
MAIN DASHBOARD:
Show Main Dashboard
โ Purpose: Toggle visibility of market conditions table
โ Default: ON
Main Dashboard Position
โ Options: Top Right, Top Left, Bottom Right, Bottom Left
โ Default: Top Right
โ When to change: To avoid overlap with TradingView's built-in panels
TRADE ANALYSIS PANEL:
Show Trade Analysis Panel
โ Purpose: Toggle factor analysis dashboard
โ Default: ON
Analysis Panel Position
โ Options: Top Right, Top Left, Bottom Right, Bottom Left, Middle Right, Middle Left
โ Default: Bottom Left
โ Recommended: Bottom Right or Middle Right to avoid overlap with Main Dashboard
Compact Mode
โ Purpose: Reduces panel size for mobile or smaller screens
โ Default: OFF
โ When to enable: Mobile trading, small screens, or minimalist preference
Show Factor Details
โ Purpose: Displays individual factor scores vs. overall confidence only
โ Default: ON
โ When to disable: For more compact view showing only state and confidence
RISK MANAGEMENT:
Stop Loss Method
โ Purpose: How stop loss distance is calculated
โ Options:
โข Structure-Based: Uses swing highs/lows with ATR buffer (recommended)
โข ATR-Based: Pure ATR multiplier with min/max constraints
โข Fixed ATR: Simple multiplier, no adjustments
โ Default: Structure-Based
โ Impact: Structure-Based respects market geometry but constrains within safe limits
ATR Stop Multiplier
โ Purpose: Multiplier for ATR-based stop calculation
โ Range: 0.5 to 3.0
โ Default: 1.5
โ When to adjust:
โข Increase to 2.0-2.5 for more breathing room (fewer false stops)
โข Decrease to 1.0-1.2 for tighter stops (but more stop-outs)
Maximum Stop Distance (ATR)
โ Purpose: Cap on stop width to prevent excessive risk
โ Range: 1.0 to 5.0
โ Default: 2.5
โ Impact: If structure-based stop exceeds this, ATR-based stop is used instead
Minimum Stop Distance (ATR)
โ Purpose: Floor on stop width to avoid noise-induced stops
โ Range: 0.2 to 1.0
โ Default: 0.5
โ Impact: Prevents stops too tight to survive normal volatility
Target 1 Risk/Reward Ratio
โ Purpose: R:R for first profit target
โ Range: 0.5 to 2.0
โ Default: 1.0 (1:1 ratio)
โ Common values: 1.0 for quick profit taking, 1.5 for patient trading
Target 2 Risk/Reward Ratio
โ Purpose: R:R for second profit target (full win)
โ Range: 1.0 to 4.0
โ Default: 2.0 (1:2 ratio)
โ Common values: 2.0-3.0 for balanced risk/reward
Minimum R:R Required
โ Purpose: Filters out signals with poor risk/reward
โ Range: 0.5 to 2.0
โ Default: 1.0
โ Impact: Signals where potential reward doesn't meet this ratio are rejected
โ WARNING: Always ensure your position sizing means a stop loss = no more than 1-2% of your account, regardless of R:R ratio
SIGNAL FILTERS:
Session Awareness
โ Purpose: Weights signals higher during major forex sessions
โ Default: ON
โ Impact: Doesn't block signals, but session quality factors into scoring
โ Best for: Forex traders
Session Timezone
โ Purpose: Timezone for session calculations
โ Options: UTC, America/New_York, Europe/London, Asia/Tokyo, Asia/Hong_Kong
โ Default: UTC
โ When to change: Match your broker's server time
Higher Timeframe Alignment
โ Purpose: Checks HTF momentum before generating signals
โ Default: ON
โ Impact: Filters counter-trend signals, improves quality
โ Recommended: Keep enabled
HTF Timeframe
โ Purpose: Which higher timeframe to check
โ Default: Auto (blank field)
โ Auto selection:
โข 1m chart โ 5m HTF
โข 5m chart โ 15m HTF
โข 15m chart โ 1H HTF
โข 1H chart โ 4H HTF
โข 4H+ chart โ Daily HTF
โ Manual override: Enter any timeframe (e.g., "60" for 1-hour)
Volume Confirmation
โ Purpose: Requires above-average volume for signals
โ Default: ON
โ Impact: Filters low-liquidity false signals
โ Recommended: Keep enabled
Minimum Volume Ratio
โ Purpose: Volume threshold vs. 20-bar average
โ Range: 0.3 to 2.0
โ Default: 0.8 (80% of average)
โ When to adjust:
โข Increase to 1.2-1.5 for only high-volume signals
โข Decrease to 0.5-0.7 for more permissive filtering
Structure Clearance Check
โ Purpose: Ensures clear path to targets (no nearby resistance/support)
โ Default: ON
โ Impact: Prevents trades with immediate obstacles
โ Recommended: Keep enabled
Minimum Bars Between Signals
โ Purpose: Cooldown period after each signal
โ Range: 1 to 10
โ Default: 3
โ Impact: After a signal, this many bars must pass before another in same direction
โ When to adjust:
โข Increase to 5-7 to prevent over-trading
โข Decrease to 1-2 for faster re-entries
ADVANCED TUNING:
Momentum Period
โ Purpose: Base period for Kinetic Pulse calculation
โ Range: 5 to 30
โ Default: 14
โ When to adjust:
โข Lower (8-10): More responsive, noisier
โข Higher (18-21): Smoother, slower to react
โ Note: If Adaptive Period enabled, this is adjusted automatically
Adaptive Period
โ Purpose: Auto-adjusts momentum period based on volatility
โ Default: ON
โ Impact: Shortens period in high volatility, lengthens in low volatility
โ Recommended: Keep enabled for automatic optimization
Divergence Lookback
โ Purpose: How far back to search for divergence patterns
โ Range: 10 to 60
โ Default: 30
โ When to adjust:
โข Shorter (15-20): Only recent divergences
โข Longer (40-50): Catches older divergences (may be less relevant)
Swing Detection Bars
โ Purpose: Bars required on each side to confirm swing high/low
โ Range: 2 to 7
โ Default: 3
โ Impact on stops:
โข Lower (2-3): More swing points, potentially tighter stops
โข Higher (5-7): Only major swings, wider stops
Choppiness Index Threshold
โ Purpose: Threshold above which market considered choppy
โ Range: 38.2 to 80.0
โ Default: 61.8
โ Impact:
โข Lower (50-55): Stricter quality filter (fewer signals in ranging markets)
โข Higher (65-70): More permissive (allows signals in choppier conditions)
HOW TO READ SIGNALS
SIGNAL ANATOMY:
When a signal appears, you'll see:
1. DIRECTIONAL MARKER
โ Arrow, dot, or diamond pointing to entry candle (depends on style)
โ Positioned below price for LONG, above price for SHORT
โ Connected to price with line (Premium style)
2. GRADE BADGE
โ Displays signal quality: LONG , SHORT , etc.
โ Color coding:
โข Bright green/cyan for A+ longs
โข Standard green for A/B longs
โข Bright pink/magenta for A+ shorts
โข Standard red for A/B shorts
3. ENTRY PRICE (Premium style only)
โ Shows exact entry price at signal generation
4. TOOLTIP (all styles)
โ Hover over signal to see complete trade plan
โ Includes: Entry, Stop, TP1, TP2, Risk, R:R ratios, market conditions, signal reason, confluence score
INTERPRETING GRADES:
โ A+ SIGNALS (Highest Quality)
โข 8-12+ confirming factors aligned
โข Multiple divergences OR strong momentum reversal
โข HTF alignment + volume + session timing + clear structure
โข These are your highest-probability setups
โข Recommended action: Give these priority, consider larger position size
โ A SIGNALS (High Quality)
โข 5-9+ confirming factors aligned
โข Good confluence, most key factors present
โข Missing 1-2 optimal conditions
โข These are still quality trades
โข Recommended action: Standard position size, solid setups
โ B SIGNALS (Moderate Quality)
โข 3-7+ confirming factors aligned
โข Minimum viable confluence
โข May be missing HTF alignment, volume, or session timing
โข Higher variance outcomes
โข Recommended action: Smaller position size or skip if conservative
SIGNAL NARRATIVE:
Each signal tooltip includes a narrative explaining WHY it was generated:
โ "Multi-divergence at oversold extreme"
โข Multiple oscillators showing bullish divergence
โข Kinetic Pulse in oversold zone
โข High-quality reversal setup
โ "Bullish divergence near support"
โข Divergence detected
โข Price near key support level (swing low or PDL)
โข Structure confluence
โ "Momentum reversal with HTF alignment"
โข Kinetic Pulse velocity reversing
โข Higher timeframe supports direction
โข Strong trend-following setup
โ "Oversold momentum reversal"
โข Extreme Kinetic Pulse reading reversing
โข May not have divergence but strong momentum shift
READING THE TRADE PLAN:
Every signal comes with a complete trade plan:
โ ENTRY: The close price of the signal candle
โข This is where the signal triggered
โข If using limit orders, you might improve on this price
โ STOP: Calculated stop loss level
โข Based on your Stop Loss Method setting
โข Distance shown in ticks
โข Risk tolerance: Ensure this represents โค1-2% of your account
โ TP1: First profit target
โข Default: 1:1 risk-reward
โข This is your partial profit or first exit
โข Consider taking 50% off at TP1
โ TP2: Second profit target
โข Default: 1:2 risk-reward
โข This is your "full win" target
โข Hold remaining position for this level
SIGNAL FREQUENCY EXPECTATIONS:
Frequency varies by timeframe, sensitivity, and market conditions:
โ AGGRESSIVE MODE
โข Lower timeframes (1m-5m): 5-15 signals per day
โข Mid timeframes (15m-1H): 2-5 signals per day
โข Higher timeframes (4H-D): 1-3 signals per week
โ BALANCED MODE (Default)
โข Lower timeframes: 3-8 signals per day
โข Mid timeframes: 1-3 signals per day
โข Higher timeframes: 2-5 signals per week
โ CONSERVATIVE MODE
โข Lower timeframes: 1-4 signals per day
โข Mid timeframes: 0-2 signals per day
โข Higher timeframes: 1-3 signals per week
Note: Frequency also depends on market volatility and trending vs. ranging conditions.
Example - Kinetic Scalper Trade Sequence
Here's an example showing the complete trade lifecycle with all dashboard transitions, annotations, and descriptions.
INSTRUMENT & TIMEFRAME DETAILS
Symbol: Nifty 50 Index (NSE)
Date: December 15, 2025
Session: London session (active trading hours)
Instrument Type: Index (auto-detected)
TRADE SEQUENCE BREAKDOWN
SCREENSHOT 1: Pre-Signal Setup Building (Image 1)
Time: ~12:00-14:30 UTC+5:30(approx.)
Price Action: Uptrend showing signs of exhaustion near 26,200
Market State: Price at session highs
Main Dashboard (Top Right):
- Bias: LEAN SHORT
- Pulse: 58.9 (approaching overbought)
- Volatility: NORMAL
- Trend: TRANSITIONING
- Session: LONDON (favorable timing)
- Volume: 0.98x (slightly below average)
- HTF: BULLISH (caution for counter-trend)
- Best Score: 9/5 (Short score building)
- PDH/PDL: 26098.25 / 25938.95
Trade Analysis Panel (Bottom Left):
- Status: NO ACTIVE TRADE
- Long Score: 5/5 (RDY)
- Short Score: 9/5 (RDY)
- Panel Message: "Short pattern developing - score: 9"
Description :
Setup Development Phase: The indicator identifies a potential short opportunity as price reaches the previous day's high. The short confluence score has climbed to 9/15 points, meeting the 'Balanced' sensitivity threshold for a Grade B signal. Notice the 'LEAN SHORT' bias and the Kinetic Pulse reading of 58.9 approaching overbought territory. The Trade Analysis panel shows 'Short pattern developing' with 9/5 factors aligned. Key factors: momentum approaching reversal zone, price at resistance (PDH), and London session providing favorable conditions.
SCREENSHOT 2: Signal Generated & Trade Entered (Image 2)
Time: ~13:00 UTC+5:30 (signal bar)
Entry Price: 26,184.65
Signal Grade: Grade
Main Dashboard (Top Right):
- Trade: SHORT
- Entry: 26184.65
- P/L: 5.95 pts | +0.2R (early positive movement)
- TP1: 26157.00 (33.2 pts away)
- TP2: 26129.35 (60.84 pts away)
- Stop: 26212.30 (22.1 pts away)
- Bars: 1 (just entered)
Trade Analysis Panel (Bottom Left):
- Header: TRADE ANALYSIS
- Status Bar: "Conditions mixed - improving 57%"
- Confidence: 57% RISING
- Factor Breakdown:
- Momentum: -4 (velocity not yet aligned)
- Position: +4 (slight profit)
- Volume: +2 = (volume present)
- HTF Align: +2 = (not strongly aligned)
- Target: +0 - (far from TP)
- Stop Dist: +3 - (good distance)
- Bottom Status: "Conditions mixed - Monitoring"
- Disclaimer: "Analysis only - Not financial advice"
Description:
Signal Activation: A Grade A short signal triggers at 26,184.65 after the short confluence score reached qualifying levels. The indicator places a structure-based stop loss at 26,212.30 (27.65 points risk) with dual targets at 1:1 and 1:2 risk-reward ratios.
The Trade Analysis Panel immediately begins monitoring with an initial confidence score of 57% - classified as 'MIXED SIGNALS' but showing a 'RISING' trend. Factor analysis reveals: momentum not yet aligned (-4 points as price just reversed), position slightly favorable (+4 points already +0.2R), volume adequate (+2), HTF showing weak alignment (+2 as we're counter-trend), stop well-placed (+3), but targets still distant (0 points).
Notice how the Main Dashboard switches from market scanning mode to active trade tracking, now displaying entry price, live P/L in both points (5.95 pts) and R-multiples (+0.2R), and distances to all key levels. The analysis panel provides real-time factor scoring to help monitor trade health.
SCREENSHOT 3: TP1 Hit - Trade Performing Well (Image 3)
Time: ~14:20 UTC+5:30(approx)
Price: ~26,154 (TP1 zone)
Bars in Trade: 29
Main Dashboard (Top Right):
- Trade: SHORT
- Entry: 26184.65
- P/L: 30.85 pts | +1.12R (excellent progress)
- TP1: HIT (displayed in green)
- TP2: 26129.35 (24.44 pts away)
- Stop: 26212.30 (58.5 pts away - well protected)
- Bars: 29
Trade Analysis Panel (Bottom Left):
- Header: TRADE ANALYSIS
- Status Bar: "Multiple factors positive"
- Confidence: 78% RISING
- Factor Breakdown:
- Momentum: +8 = (ALIGNED)
- Position: +8 + (strong profit zone)
- Volume: +2 + (continued support)
- HTF Align: +8 = (now strongly aligned)
- Target: +10 + (TP1 achieved, approaching TP2)
- Stop Dist: +3 + (excellent cushion)
- Bottom Status: "Multiple factors positive"
- Visual State: Green background (FACTORS ALIGNED state)
Description:
Trade Execution Phase - First Target Achieved: After 29 bars , price reaches the first take-profit target at 26,157.00. The ' ' marker confirms partial profit taking. Current P/L shows +30.85 points (+1.12R), exceeding the initial 1:1 risk-reward.
The Trade Analysis Panel shows dramatic improvement - confidence has surged to 78% (FACTORS ALIGNED state) with most factors now positive:
- Momentum factor improved to +8 (velocity aligned with trade direction)
- Position factor at +8 (over +1R profit zone)
- HTF Align jumped to +8 (higher timeframe now confirming the move)
- Target factor maxed at +10 (TP1 achieved, TP2 within reach)
- Stop Distance at +3 (58.5 points cushion providing safety)
Notice the panel status displays 'Multiple factors positive' with a green-tinted background, indicating optimal trade conditions. The confidence trend shows 'RISING' suggesting continued momentum. With TP1 secured and only 24.44 points to TP2, the trade is well-positioned for a full 1:2R win.
SCREENSHOT 4: TP2 Reached - Trade Complete (Image 4)
Time: ~15:00+ UTC+5:30
Final Exit: 26,129.35 (TP2)
Final Result: Full TP2 win
Main Dashboard (Top Right):
- Bias: NEUTRAL (reverted to scanning mode)
- Pulse: 45.2 (returned to neutral zone)
- Volatility: NORMAL
- Trend: TREND DOWN (confirmed the move)
- Session: LONDON
- Volume: 1.26x (increased as move developed)
- HTF: BEARISH (fully aligned post-trade)
- Best Score: 5/5 (neutral after completion)
Trade Analysis Panel (Bottom Left):
- Status: NO ACTIVE TRADE (reverted)
- Long Score: 5/5 (RDY)
- Short Score: 5/5 (RDY)
- Panel Message: "Scanning - prime session active"
- Light blue/cyan background (back to scanning mode)
Description:
Trade Completion - Full Target Achieved: The short trade reaches its second take-profit target at 26,129.35, securing a complete 1:2 risk-reward win. The ' ' marker confirms the exit. Final results:
- Entry: 26,184.65
- Exit: 26,129.35
- Profit: 55.30 points (approximately +2.0R)
- Outcome: Full TP2 success
Post-Trade Analysis: After trade closure, the indicator automatically returns to market scanning mode. The Main Dashboard reverts to showing market conditions rather than trade metrics. Notice how the 'Trend' now displays 'TREND DOWN' - confirming the move we captured. Volume increased to 1.26x during the winning move, validating the signal quality.
The Trade Analysis Panel switches back to 'NO ACTIVE TRADE' status and resumes displaying long/short setup scores. The confidence-based factor monitoring was instrumental throughout the trade:
- Initial entry at 57% confidence (MIXED SIGNALS)
- Peak confidence of 78% at TP1 (FACTORS ALIGNED)
- Real-time factor updates helped confirm trade validity
This example demonstrates the indicator's complete workflow: setup identification โ signal generation โ entry execution โ live trade monitoring โ systematic exit at targets.
KEY FEATURES DEMONSTRATED
1. Dual Dashboard System
- Main Dashboard: Market conditions (scanning) โ Trade metrics (active position)
- Analysis Panel: Setup scores (scanning) โ Factor-based confidence (in-trade)
2. Visual Trade Management
- Color-coded entry zones (yellow)
- Risk levels clearly marked (red dashed stop)
- Profit targets with R:R ratios labeled
- Achievement markers ( , )
3. Real-Time Factor Analysis
- 6-factor scoring system (Momentum, Position, Volume, HTF, Target, Stop Dist)
- Confidence percentage with trend indicators
- State machine (MIXED โ FACTORS ALIGNED)
- Hysteresis prevents false state changes
4. Risk Management
- Structure-based stop placement (respects swing highs)
- Multiple take-profit levels (1:1 and 1:2 R:R)
- Live P/L tracking in points and R-multiples
- Distance monitoring to all key levels
This complete example showcases the indicator's progression from setup identification through trade completion, demonstrating how the dual-dashboard system and factor-based analysis provide continuous trade guidance. The structured stop-loss and dual-target approach delivered the planned 1:2 risk-reward ratio with systematic, rule-based execution.
ALERT SYSTEM
The indicator includes 9 built-in alert conditions:
SIGNAL ALERTS:
โ High-Grade Long Signal (A+)
โข Triggers only on A+ long signals
โข For traders who want only the highest-quality longs
โข Message: "KINETIC SCALPER: LONG @ "
โ High-Grade Short Signal (A+)
โข Triggers only on A+ short signals
โข For traders who want only the highest-quality shorts
โข Message: "KINETIC SCALPER: SHORT @ "
โ Long Signal
โข Triggers on ANY qualified long signal (A+, A, or B)
โข For traders who want all long opportunities
โข Message: "KINETIC SCALPER: LONG @ "
โ Short Signal
โข Triggers on ANY qualified short signal
โข For traders who want all short opportunities
โข Message: "KINETIC SCALPER: SHORT @ "
TRADE MANAGEMENT ALERTS:
โ TP1 Hit
โข Triggers when first profit target is reached
โข Useful for partial profit taking notifications
โข Message: "KINETIC SCALPER: TP1 REACHED"
โ TP2 Reached
โข Triggers when second profit target is reached
โข Trade is complete, full win achieved
โข Message: "KINETIC SCALPER: TP2 REACHED"
โ Stop Loss Hit
โข Triggers when stop loss is reached
โข Important for trade management and risk tracking
โข Message: "KINETIC SCALPER: STOP LOSS"
ANALYSIS STATE ALERTS:
โ Analysis State: Negative Bias
โข Triggers when factor analysis enters "Negative Bias" state
โข Warning that trade conditions are deteriorating
โข Consider reducing position or preparing to exit
โข Message: "KINETIC SCALPER: Analysis state changed to NEGATIVE BIAS"
โ Analysis State: Factors Weakening
โข Triggers when factor analysis enters "Factors Weakening" state
โข Caution that confluence is diminishing
โข Monitor trade closely
โข Message: "KINETIC SCALPER: Analysis state changed to FACTORS WEAKENING"
HOW TO SET UP ALERTS:
1. Click the "Create Alert" button in TradingView
2. Condition: Select "Kinetic Scalper "
3. Choose your desired alert from the dropdown
4. Configure your alert options:
โ Once Per Bar Close (recommended for non-repainting)
โ Frequency: Once Per Bar Close or Only Once
5. Set expiration and notification methods (popup, email, webhook, etc.)
6. Create alert
RECOMMENDED ALERT STRATEGY:
For active traders:
โ Set "Long Signal" and "Short Signal" alerts for all opportunities
โ Set "TP1 Hit", "TP2 Reached", and "Stop Loss Hit" for trade management
โ Consider "Analysis State: Negative Bias" for trade monitoring
For selective traders:
โ Set only "High-Grade Long Signal (A+)" and "High-Grade Short Signal (A+)"
โ Focus on the absolute highest-quality setups
โ Set TP/SL alerts for position management
USAGE TIPS & BEST PRACTICES
SIGNAL SELECTION:
โ GRADE MATTERS
โ A+ signals have statistically more confluence factors
โ If you're conservative, trade only A+ signals
โ B signals can work but require more discretion
โ CONFLUENCE WITH YOUR ANALYSIS
โ Use this indicator as CONFIRMATION, not sole decision criteria
โ Combine with your own support/resistance analysis
โ Check for fundamental events (news, economic data)
โ Respect major round numbers and psychological levels
โ SESSION TIMING (Forex)
โ Best signals often occur during London/NY overlap
โ Avoid signals 10 minutes before major news releases
โ Asian session signals can be valid but lower liquidity
โ TIMEFRAME CONFLUENCE
โ If you get an A+ signal on 15m, check if 1H chart agrees
โ Higher timeframe confirmation adds conviction
โ Avoid signals that oppose the daily/4H trend
TRADE MANAGEMENT:
โ POSITION SIZING
โ ALWAYS size positions so stop loss = 1-2% of account
โ Never risk more than you can afford to lose
โ Smaller position on B signals, standard on A, larger on A+ (within limits)
โ PARTIAL PROFIT TAKING
โ Consider taking 50% off at TP1
โ Move stop to breakeven after TP1 hit
โ Let remaining position run to TP2
โ TRAILING STOPS
โ The indicator doesn't auto-trail stops (manual decision)
โ After TP1, you might manually move stop to entry (breakeven)
โ Consider ATR-based trailing stop for runners
โ WATCH THE ANALYSIS PANEL
โ If state changes to "Factors Weakening" while in profit, consider exit
โ "Negative Bias" during a trade is a strong warning
โ "Factors Aligned" confirms your trade thesis is still valid
RISK MANAGEMENT:
โ NEVER IGNORE STOPS
โ The calculated stop is there for a reason
โ Moving stop further away increases risk exponentially
โ If stopped out, accept it and wait for next setup
โ AVOID REVENGE TRADING
โ If you get stopped out, resist urge to immediately re-enter
โ Signal cooldown helps with this
โ Wait for next qualified signal
โ RESPECT VOLATILITY WARNINGS
โ If indicator shows "EXTREME" volatility, signals are blocked for a reason
โ Don't force trades in chaotic conditions
โ Wait for regime to normalize
โ CORRELATION RISK
โ Be aware of correlation if trading multiple pairs
โ EUR/USD and GBP/USD are highly correlated
โ Don't stack risk on correlated instruments
OPTIMIZATION:
โ START WITH DEFAULTS
โ Default settings are well-tested
โ Don't over-optimize for recent market behavior
โ Give settings at least 20-30 trades before judging
โ TIMEFRAME-SPECIFIC ADJUSTMENTS
โ Lower timeframes: Consider increasing Signal Distance to 3.0-4.0
โ Higher timeframes: ATR Stop Multiplier might go to 2.0-2.5
โ Crypto: Ensure Instrument Type is set to "Crypto" for proper stops
โ SENSITIVITY CALIBRATION
โ Too many signals? Switch to Conservative
โ Missing good setups? Try Balanced or Aggressive
โ Quality > Quantity always
โ KEEP A JOURNAL
โ Track which signal grades work best for you
โ Note which sessions produce best results
โ Review stopped trades for patterns
THINGS TO AVOID:
โ DON'T chase signals after several bars have passed
โ DON'T ignore the stop loss or move it further away
โ DON'T overtrade by taking every B-grade signal
โ DON'T trade during major news if you're not experienced
โ DON'T use this as your only analysis tool
โ DON'T expect 100% win rate (no indicator has this)
โ DON'T risk more than 1-2% per trade regardless of signal grade
UNDERSTANDING THE METHODOLOGY
WHY VOLUME WEIGHTING?
Traditional momentum oscillators treat all price moves equally. A 10-point move on low volume is weighted the same as a 10-point move on high volume.
The Kinetic Pulse corrects this by:
โ Calculating volume ratio vs. 20-bar average
โ Applying square root transformation to volume ratio (prevents extreme weights)
โ Multiplying price changes by volume weight
โ Result: High-volume moves influence the oscillator more than low-volume noise
This helps filter false breakouts and emphasizes moves with participation.
WHY FISHER TRANSFORM?
Fisher Transform is a mathematical transformation that:
โ Normalizes probability distributions
โ Creates sharper turning points
โ Amplifies extremes while compressing the middle
โ Makes overbought/oversold levels more distinct
Applied to the Kinetic Pulse, it helps identify genuine extremes vs. noise.
WHY MULTI-OSCILLATOR DIVERGENCE?
Single-source divergence can give false signals. By requiring divergence confirmation across multiple oscillators (Kinetic Pulse, CCI, Stochastic), the system filters out:
โ Divergences caused by calculation quirks in one oscillator
โ Temporary momentum anomalies
โ False divergence on noisy, low-timeframe charts
Multiple sources confirming the same pattern increases reliability.
WHY ADAPTIVE PERIODS?
Fixed periods can be:
โ Too slow during high volatility (miss fast reversals)
โ Too fast during low volatility (generate noise)
The adaptive system:
โ Shortens period when ATR ratio > 1.3 (high volatility = need faster response)
โ Lengthens period when ATR ratio < 0.7 (low volatility = need noise filtering)
โ Keeps period in reasonable range (60% to 140% of base period)
โ Result: Oscillator adjusts to current market pace automatically
WHY HYSTERESIS IN STATE MACHINE?
Without hysteresis, the analysis state would flip-flop on every bar, creating:
โ Confusing, contradictory guidance
โ Analysis paralysis
โ Lack of actionable information
Hysteresis solves this by:
โ Using different thresholds to ENTER vs. EXIT a state
โ Example: Enter "Factors Aligned" at 72+ confidence, but don't exit until <62
โ This creates stable states that persist through minor fluctuations
โ Requires minimum commitment period (3 bars) before state changes
โ Overrides commitment for significant events (near TP/SL)
โ Result: Stable, trustworthy analysis that changes only when truly warranted
WHY CONFIDENCE SMOOTHING?
Raw factor scores fluctuate bar-by-bar based on momentary conditions. Smoothing:
โ Uses 5-period EMA on raw confidence scores
โ Filters out single-bar anomalies
โ Preserves genuine trends in confidence
โ Prevents false state transitions
โ Result: More reliable assessment of actual trade health
WHY INSTRUMENT-SPECIFIC PARAMETERS?
Different instruments have different characteristics:
โ Forex is highly liquid, respects technical levels well, standard ATR works
โ Crypto is extremely volatile, needs wider stops (1.8x) to avoid false stops
โ Indices respect session opens strongly, session weighting is important
โ Commodities fall in between
Auto-detection applies research-based multipliers automatically.
WHY STRUCTURE-BASED STOPS?
ATR-based stops can:
โ Place stop in middle of consolidation (easily hit)
โ Ignore obvious invalidation levels
โ Be too tight during expansion or too wide during contraction
Structure-based stops:
โ Use actual swing highs/lows (where traders actually place stops)
โ Add small ATR buffer to avoid stop hunting
โ Constrain within min/max ATR limits for safety
โ Result: Stops that respect market geometry while managing risk
DISCLAIMER & RISK WARNING
READ THIS CAREFULLY BEFORE USING THIS INDICATOR
This indicator is provided for EDUCATIONAL and INFORMATIONAL purposes only.
โ NOT FINANCIAL ADVICE
This indicator does NOT constitute financial advice, investment recommendations, or solicitation to buy or sell any financial instrument. All information is for educational purposes only.
โ NO GUARANTEES
โ Past performance does NOT guarantee future results
โ No indicator can predict future price movements with certainty
โ Signal grades represent confluence, NOT win probability
โ A+ signals can lose, B signals can win - markets are probabilistic
โ SUBSTANTIAL RISK
Trading financial instruments involves SUBSTANTIAL RISK of loss:
โ You can lose your entire investment
โ Leveraged trading amplifies both gains AND losses
โ Never trade with money you cannot afford to lose
โ Never risk more than 1-2% of your account per trade
โ YOUR RESPONSIBILITY
โ All trading decisions are YOUR responsibility
โ You must conduct your own analysis before entering trades
โ Consult a licensed financial advisor before trading
โ Understand the risks specific to your jurisdiction and situation
โ Only trade with capital you can afford to lose completely
โ NO HOLY GRAIL
โ This indicator is a TOOL, not a complete trading system
โ It should be used as part of a broader analysis framework
โ Combine with your own technical analysis, risk management, and judgment
โ No indicator works 100% of the time in all market conditions
โ ANALYSIS PANEL DISCLAIMER
The "Trade Analysis Panel" provides ALGORITHMIC ANALYSIS of market factors.
โ It does NOT provide investment advice or recommendations
โ Factor scores are mathematical calculations, not predictions
โ Guidance messages are informational, not directives
โ All trading decisions remain your responsibility
โ BACKTESTING LIMITATIONS
โ This is an indicator, not a strategy, so no backtesting results are provided
โ Any backtesting you perform includes hindsight bias and optimization bias
โ Historical performance does not indicate future performance
โ Slippage, commissions, and real-world execution differ from backtests
โ MARKET CONDITIONS
โ This indicator performs differently in trending vs. ranging markets
โ Extreme volatility can produce false signals or whipsaws
โ Low liquidity periods increase execution risk
โ Major news events can invalidate technical analysis
BY USING THIS INDICATOR, YOU ACKNOWLEDGE:
โ You have read and understood this disclaimer
โ You accept full responsibility for your trading decisions
โ You understand the substantial risks involved in trading
โ You will not hold the author liable for any losses incurred
โ You are using this tool as part of your own due diligence process
KEY FEATURES SUMMARY
โ
Volume-Weighted Kinetic Pulse Engine (proprietary momentum calculation)
โ
15-Factor Confluence Scoring System (graded signals: A+, A, B)
โ
Multi-Oscillator Divergence Detection (Pulse + CCI + Stochastic)
โ
Higher Timeframe Trend Alignment Filter
โ
Adaptive Period Adjustment (volatility-responsive)
โ
Instrument-Aware Calibration (Forex, Crypto, Indices, Commodities)
โ
Structure-Based Stop Loss Calculation (respects swing highs/lows)
โ
Automated Trade Tracking (entry, stop, TP1, TP2, P/L)
โ
Real-Time Factor Analysis State Machine (5-state system with hysteresis)
โ
Session Awareness (Asian, London, New York, Overlap)
โ
Volatility Regime Detection (blocks signals in extreme conditions)
โ
Choppiness Filter (reduces signals in ranging markets)
โ
Volume Confirmation (relative volume and delta analysis)
โ
Clean Air Check (validates clear path to targets)
โ
Comprehensive Dashboards (market conditions + trade analysis)
โ
Customizable Display (3 signal styles, color themes, positioning)
โ
9 Built-In Alert Conditions (signals, TP/SL hits, state changes)
โ
Fully Non-Repainting (barstate.isconfirmed, lookahead_off)
โ
Previous Day Levels (PDH/PDL reference lines)
โ
Mobile-Friendly Compact Mode (for smaller screens)
TECHNICAL SPECIFICATIONS
โ Pine Script Version: v6
โ Indicator Type: Overlay (displays on price chart)
โ License: Mozilla Public License 2.0
โ Copyright: BULLBYTE
โ Object Limits: 300 labels, 100 lines, 50 boxes
โ Memory Management: Automatic cleanup system (FIFO queue)
โ Repainting: Non-repainting (signals confirmed on bar close)
โ Timeframe Support: All timeframes (1s to Monthly)
โ Instrument Support: Forex, Crypto, Indices, Commodities, Stocks
โ HTF Data Handling: lookahead_off with historical offset
VERSION HISTORY
v1.0 - Initial Release
โ Kinetic Pulse engine with volume weighting and Fisher Transform
โ 15-factor confluence scoring system
โ Trade analysis state machine with hysteresis
โ Automated trade tracking and monitoring
โ Dual dashboard system (market conditions + factor analysis)
โ 9 alert conditions
โ 3 signal display styles
โ Instrument-aware calibration
โ Full risk management framework
WHO IS THIS INDICATOR FOR?
IDEAL FOR:
โ Scalpers and day traders seeking high-confluence reversal entries
โ Swing traders who want quality over quantity
โ Traders who appreciate systematic, rules-based analysis
โ Multi-timeframe traders who value HTF confirmation
โ Forex traders who respect session timing
โ Crypto traders needing volatility-adjusted parameters
โ Traders who want complete trade management (entry, stop, targets)
โ Analytical traders who want transparency in signal generation
NOT IDEAL FOR:
โ Traders seeking a "set and forget" holy grail system
โ Traders who don't want to learn the methodology
โ Traders unwilling to accept losing trades as part of the process
โ Traders who need constant signals (this is a quality-focused system)
โ Traders who ignore risk management
FINAL THOUGHTS
The Kinetic Scalper is the result of extensive research into momentum behavior, volume confirmation, and multi-factor confluence analysis. It's designed to identify high-probability reversal setups while maintaining strict risk management and providing complete transparency.
This is NOT a magic solution. It's a sophisticated TOOL that requires:
โ Understanding of the methodology
โ Proper risk management discipline
โ Patience to wait for quality setups
โ Willingness to accept losses as part of trading
โ Integration with your own analysis and judgment
Used properly as part of a complete trading plan, the Kinetic Scalper can help you identify high-confluence opportunities and manage trades systematically.
Remember: Quality over quantity. Discipline over emotion. Risk management over everything.
Trade smart. Trade safe.
ยฉ 2025 BULLBYTE | Kinetic Scalper v1.0 | For Educational Purposes Only
Market Regime# MARKET REGIME IDENTIFICATION & TRADING SYSTEM
## Complete User Guide
---
## ๐ TABLE OF CONTENTS
1. (#overview)
2. (#regimes)
3. (#indicator-usage)
4. (#entry-signals)
5. (#exit-signals)
6. (#regime-strategies)
7. (#confluence)
8. (#backtesting)
9. (#optimization)
10. (#examples)
---
## OVERVIEW
### What This System Does
This is a **complete market regime identification and trading system** that:
1. **Identifies 6 distinct market regimes** automatically
2. **Adapts trading tactics** to each regime
3. **Provides high-probability entry signals** with confluence scoring
4. **Shows optimal exit points** for each trade
5. **Can be backtested** to validate performance
### Two Components Provided
1. **Indicator** (`market_regime_indicator.pine`)
- Visual regime identification
- Entry/exit signals on chart
- Dynamic support/resistance
- Info tables with live data
- Use for manual trading
2. **Strategy** (`market_regime_strategy.pine`)
- Fully automated backtestable version
- Same logic as indicator
- Position sizing and risk management
- Performance metrics
- Use for backtesting and automation
---
## THE 6 MARKET REGIMES
### 1. ๐ข BULL TRENDING
**Characteristics:**
- Strong uptrend
- Price above SMA50 and SMA200
- ADX > 25 (strong trend)
- Higher highs and higher lows
- DI+ > DI- (bullish momentum)
**What It Means:**
- Market has clear upward direction
- Buyers in control
- Pullbacks are buying opportunities
- Strongest regime for long positions
**How to Trade:**
- โ
**BUY dips to EMA20 or SMA20**
- โ
Enter when RSI < 60 on pullback
- โ
Hold through minor corrections
- โ Don't short against the trend
- โ Don't sell too early
**Expected Behavior:**
- Pullbacks are shallow (5-10%)
- Bounces are strong
- Support at moving averages holds
- Volume increases on rallies
---
### 2. ๐ด BEAR TRENDING
**Characteristics:**
- Strong downtrend
- Price below SMA50 and SMA200
- ADX > 25 (strong trend)
- Lower highs and lower lows
- DI- > DI+ (bearish momentum)
**What It Means:**
- Market has clear downward direction
- Sellers in control
- Rallies are selling opportunities
- Strongest regime for short positions
**How to Trade:**
- โ
**SELL rallies to EMA20 or SMA20**
- โ
Enter when RSI > 40 on bounce
- โ
Hold through minor bounces
- โ Don't buy against the trend
- โ Don't cover shorts too early
**Expected Behavior:**
- Rallies are weak (5-10%)
- Selloffs are strong
- Resistance at moving averages holds
- Volume increases on declines
---
### 3. ๐ต BULL RANGING
**Characteristics:**
- Bullish bias but consolidating
- Price near or above SMA50
- ADX < 20 (weak trend)
- Trading in range
- Choppy price action
**What It Means:**
- Uptrend is pausing
- Accumulation phase
- Support and resistance zones clear
- Lower volatility
**How to Trade:**
- โ
**BUY at support zone**
- โ
Enter when RSI < 40
- โ
Take profits at resistance
- โ ๏ธ Smaller position sizes
- โ ๏ธ Tighter stops
**Expected Behavior:**
- Range-bound oscillations
- Support bounces repeatedly
- Resistance rejections common
- Eventually breaks higher (usually)
---
### 4. ๐ BEAR RANGING
**Characteristics:**
- Bearish bias but consolidating
- Price near or below SMA50
- ADX < 20 (weak trend)
- Trading in range
- Choppy price action
**What It Means:**
- Downtrend is pausing
- Distribution phase
- Support and resistance zones clear
- Lower volatility
**How to Trade:**
- โ
**SELL at resistance zone**
- โ
Enter when RSI > 60
- โ
Take profits at support
- โ ๏ธ Smaller position sizes
- โ ๏ธ Tighter stops
**Expected Behavior:**
- Range-bound oscillations
- Resistance holds repeatedly
- Support bounces are weak
- Eventually breaks lower (usually)
---
### 5. โช CONSOLIDATION
**Characteristics:**
- No clear direction
- Range compression
- Very low ADX (< 15 often)
- Price inside tight range
- Neutral sentiment
**What It Means:**
- Market is coiling
- Building energy for next move
- Indecision between buyers/sellers
- Calm before the storm
**How to Trade:**
- โ
**WAIT for breakout direction**
- โ
Enter on high-volume breakout
- โ
Direction becomes clear
- โ Don't trade inside the range
- โ Avoid choppy scalping
**Expected Behavior:**
- Narrow range
- Low volume
- False breakouts possible
- Explosive move when it breaks
---
### 6. ๐ฃ CHAOS (High Volatility)
**Characteristics:**
- Extreme volatility
- No clear direction
- Erratic price swings
- ATR > 2x average
- Unpredictable
**What It Means:**
- Market panic or euphoria
- News-driven moves
- Emotion dominates logic
- Highest risk environment
**How to Trade:**
- โ **STAY OUT!**
- โ No positions
- โ Wait for stability
- โ
Protect existing positions
- โ
Reduce risk
**Expected Behavior:**
- Large intraday swings
- Gaps up/down
- Stop hunts
- Whipsaws
- Eventually calms down
---
## INDICATOR USAGE
### Visual Elements
#### 1. Background Colors
- **Light Green** = Bull Trending (go long)
- **Light Red** = Bear Trending (go short)
- **Light Teal** = Bull Ranging (buy dips)
- **Light Orange** = Bear Ranging (sell rallies)
- **Light Gray** = Consolidation (wait)
- **Purple** = Chaos (stay out!)
#### 2. Regime Labels
- Appear when regime changes
- Show new regime name
- Positioned at highs (bullish) or lows (bearish)
#### 3. Entry Signals
- **Green "LONG"** labels = Buy here
- **Red "SHORT"** labels = Sell here
- Number shows confluence score (X/5 signals)
- Hover for details (stop, target, RSI, etc.)
#### 4. Exit Signals
- **Orange "EXIT LONG"** = Close long position
- **Orange "EXIT SHORT"** = Close short position
- Shows exit reason in tooltip
#### 5. Support/Resistance Lines
- **Green line** = Dynamic support (buy zone)
- **Red line** = Dynamic resistance (sell zone)
- Adapts to regime automatically
#### 6. Moving Averages
- **Blue** = SMA 20 (short-term trend)
- **Orange** = SMA 50 (medium-term trend)
- **Purple** = SMA 200 (long-term trend)
### Information Tables
#### Top Right Table (Main Info)
Shows real-time market conditions:
- **Current Regime** - What regime we're in
- **Bias** - Long, Short, Breakout, or Stay Out
- **ADX** - Trend strength (>25 = strong)
- **Trend** - Strong, Moderate, or Weak
- **Volatility** - High or Normal
- **Vol Ratio** - Current vs average volatility
- **RSI** - Momentum (>70 overbought, <30 oversold)
- **vs SMA50/200** - Price position relative to MAs
- **Support/Resistance** - Exact price levels
- **Long/Short Signals** - Confluence scores (X/5)
#### Bottom Right Table (Regime Guide)
Quick reference for each regime:
- What action to take
- What strategy to use
- Color-coded for quick identification
---
## ENTRY SIGNALS EXPLAINED
### Confluence Scoring System (5 Factors)
Each entry signal is scored 0-5 based on how many factors align:
#### For LONG Entries:
1. โ
**Regime Alignment** - In Bull Trending or Bull Ranging
2. โ
**RSI Pullback** - RSI between 35-50 (not overbought)
3. โ
**Near Support** - Price within 2% of dynamic support
4. โ
**MACD Turning Up** - Momentum shifting bullish
5. โ
**Volume Confirmation** - Above average volume
#### For SHORT Entries:
1. โ
**Regime Alignment** - In Bear Trending or Bear Ranging
2. โ
**RSI Rejection** - RSI between 50-65 (not oversold)
3. โ
**Near Resistance** - Price within 2% of dynamic resistance
4. โ
**MACD Turning Down** - Momentum shifting bearish
5. โ
**Volume Confirmation** - Above average volume
### Confluence Requirements
**Minimum Confluence** (default = 2):
- 2/5 = Entry signal triggered
- 3/5 = Good signal
- 4/5 = Strong signal
- 5/5 = Excellent signal (rare)
**Higher confluence = Higher probability = Better trades**
### Specific Entry Patterns
#### 1. Bull Trending Entry
```
Requirements:
- Regime = Bull Trending
- Price pulls back to EMA20
- Close above EMA20 (bounce)
- Up candle (close > open)
- RSI < 60
- Confluence โฅ 2
```
#### 2. Bear Trending Entry
```
Requirements:
- Regime = Bear Trending
- Price rallies to EMA20
- Close below EMA20 (rejection)
- Down candle (close < open)
- RSI > 40
- Confluence โฅ 2
```
#### 3. Bull Ranging Entry
```
Requirements:
- Regime = Bull Ranging
- RSI < 40 (oversold)
- Price at or below support
- Up candle (reversal)
- Confluence โฅ 1 (more lenient)
```
#### 4. Bear Ranging Entry
```
Requirements:
- Regime = Bear Ranging
- RSI > 60 (overbought)
- Price at or above resistance
- Down candle (rejection)
- Confluence โฅ 1 (more lenient)
```
#### 5. Consolidation Breakout
```
Requirements:
- Regime = Consolidation
- Price breaks above/below range
- Volume > 1.5x average (explosive)
- Strong directional candle
```
---
## EXIT SIGNALS EXPLAINED
### Three Types of Exits
#### 1. Regime Change Exits (Automatic)
- **Long Exit**: Regime changes to Bear Trending or Chaos
- **Short Exit**: Regime changes to Bull Trending or Chaos
- **Reason**: Market character changed, strategy no longer valid
#### 2. Support/Resistance Break Exits
- **Long Exit**: Price breaks below support by 2%
- **Short Exit**: Price breaks above resistance by 2%
- **Reason**: Key level violated, trend may be reversing
#### 3. Momentum Exits
- **Long Exit**: RSI > 70 (overbought) AND down candle
- **Short Exit**: RSI < 30 (oversold) AND up candle
- **Reason**: Overextension, take profits
### Stop Loss & Take Profit
**Stop Loss** (Automatic in strategy):
- Placed at Entry - (ATR ร 2)
- Adapts to volatility
- Protected from whipsaws
- Typically 2-4% for stocks, 5-10% for crypto
**Take Profit** (Automatic in strategy):
- Placed at Entry + (Stop Distance ร R:R Ratio)
- Default 2.5:1 reward:risk
- Example: $2 risk = $5 reward target
- Allows winners to run
---
## TRADING EACH REGIME
### BULL TRENDING - Most Profitable Long Environment
**Strategy: Buy Every Dip**
**Entry Rules:**
1. Wait for pullback to EMA20 or SMA20
2. Look for RSI < 60
3. Enter when candle closes above MA
4. Confluence should be 2+
**Stop Loss:**
- Below the recent swing low
- Or 2 ร ATR below entry
**Take Profit:**
- At previous high
- Or 2.5:1 R:R minimum
**Position Size:**
- Can use full size (2% risk)
- High win rate regime
**Example Trade:**
```
Price: $100, pulls back to $98 (EMA20)
Entry: $98.50 (close above EMA)
Stop: $96.50 (2 ATR)
Target: $103.50 (2.5:1)
Risk: $2, Reward: $5
```
---
### BEAR TRENDING - Most Profitable Short Environment
**Strategy: Sell Every Rally**
**Entry Rules:**
1. Wait for bounce to EMA20 or SMA20
2. Look for RSI > 40
3. Enter when candle closes below MA
4. Confluence should be 2+
**Stop Loss:**
- Above the recent swing high
- Or 2 ร ATR above entry
**Take Profit:**
- At previous low
- Or 2.5:1 R:R minimum
**Position Size:**
- Can use full size (2% risk)
- High win rate regime
**Example Trade:**
```
Price: $100, rallies to $102 (EMA20)
Entry: $101.50 (close below EMA)
Stop: $103.50 (2 ATR)
Target: $96.50 (2.5:1)
Risk: $2, Reward: $5
```
---
### BULL RANGING - Buy Low, Sell High
**Strategy: Range Trading (Long Bias)**
**Entry Rules:**
1. Wait for price at support zone
2. Look for RSI < 40
3. Enter on reversal candle
4. Confluence should be 1-2+
**Stop Loss:**
- Below support zone
- Tighter than trending (1.5 ATR)
**Take Profit:**
- At resistance zone
- Don't hold through resistance
**Position Size:**
- Reduce to 1-1.5% risk
- Lower win rate than trending
**Example Trade:**
```
Range: $95-$105
Entry: $96 (at support, RSI 35)
Stop: $94 (below support)
Target: $104 (at resistance)
Risk: $2, Reward: $8 (4:1)
```
---
### BEAR RANGING - Sell High, Buy Low
**Strategy: Range Trading (Short Bias)**
**Entry Rules:**
1. Wait for price at resistance zone
2. Look for RSI > 60
3. Enter on rejection candle
4. Confluence should be 1-2+
**Stop Loss:**
- Above resistance zone
- Tighter than trending (1.5 ATR)
**Take Profit:**
- At support zone
- Don't hold through support
**Position Size:**
- Reduce to 1-1.5% risk
- Lower win rate than trending
**Example Trade:**
```
Range: $95-$105
Entry: $104 (at resistance, RSI 65)
Stop: $106 (above resistance)
Target: $96 (at support)
Risk: $2, Reward: $8 (4:1)
```
---
### CONSOLIDATION - Wait for Breakout
**Strategy: Breakout Trading**
**Entry Rules:**
1. Identify consolidation range
2. Wait for VOLUME SURGE (1.5x+ avg)
3. Enter on close outside range
4. Direction must be clear
**Stop Loss:**
- Opposite side of range
- Or 2 ATR
**Take Profit:**
- Measure range height, project it
- Example: $10 range = $10 move expected
**Position Size:**
- Reduce to 1% risk
- 50% false breakout rate
**Example Trade:**
```
Consolidation: $98-$102 (4-point range)
Breakout: $102.50 (high volume)
Entry: $103
Stop: $100 (back in range)
Target: $107 (4-point range projected)
Risk: $3, Reward: $4
```
---
### CHAOS - STAY OUT!
**Strategy: Preservation**
**What to Do:**
- โ NO new positions
- โ
Close existing positions if near entry
- โ
Tighten stops on profitable trades
- โ
Reduce position sizes dramatically
- โ
Wait for regime to stabilize
**Why It's Dangerous:**
- Stop hunts are common
- Whipsaws everywhere
- News-driven volatility
- No technical reliability
- Even "perfect" setups fail
**When Does It End:**
- Volatility ratio drops < 1.5
- ADX starts rising (direction appears)
- Price respects support/resistance again
- Usually 1-5 days
---
## CONFLUENCE SYSTEM
### How It Works
The system scores each potential entry on 5 factors. More factors aligning = higher probability.
### Confluence Requirements by Regime
**Trending Regimes** (strictest):
- Minimum 2/5 required
- 3/5 = Good
- 4-5/5 = Excellent
**Ranging Regimes** (moderate):
- Minimum 1-2/5 required
- 2/5 = Good
- 3+/5 = Excellent
**Consolidation** (breakout only):
- Volume is most critical
- Direction confirmation
- Less confluence needed
### Adjusting Minimum Confluence
**If too few signals:**
- Lower from 2 to 1
- More trades, lower quality
**If too many false signals:**
- Raise from 2 to 3
- Fewer trades, higher quality
**Recommendation:**
- Start at 2
- Adjust based on win rate
- Aim for 55-65% win rate
---
## STRATEGY BACKTESTING
### Loading the Strategy
1. Copy `market_regime_strategy.pine`
2. Open Pine Editor in TradingView
3. Paste and "Add to Chart"
4. Strategy Tester tab opens at bottom
### Initial Settings
```
Risk Per Trade: 2%
ATR Stop Multiplier: 2.0
Reward:Risk Ratio: 2.5
Trade Longs: โ
Trade Shorts: โ
Trade Trending Only: โ (test both)
Avoid Chaos: โ
Minimum Confluence: 2
```
### What to Look For
**Good Results:**
- Win Rate: 50-60%
- Profit Factor: 1.8-2.5
- Net Profit: Positive
- Max Drawdown: <20%
- Consistent equity curve
**Warning Signs:**
- Win Rate: <45% (too many losses)
- Profit Factor: <1.5 (barely profitable)
- Max Drawdown: >30% (too risky)
- Erratic equity curve (unstable)
### Testing Different Regimes
**Test 1: Trending Only**
```
Trade Trending Only: โ
Result: Higher win rate, fewer trades
```
**Test 2: All Regimes**
```
Trade Trending Only: โ
Result: More trades, potentially lower win rate
```
**Test 3: Long Only**
```
Trade Longs: โ
Trade Shorts: โ
Result: Works in bull markets
```
**Test 4: Short Only**
```
Trade Longs: โ
Trade Shorts: โ
Result: Works in bear markets
```
---
## SETTINGS OPTIMIZATION
### Key Parameters to Adjust
#### 1. Risk Per Trade (Most Important)
- **0.5%** = Very conservative
- **1.0%** = Conservative (recommended for beginners)
- **2.0%** = Moderate (recommended)
- **3.0%** = Aggressive
- **5.0%** = Very aggressive (not recommended)
**Impact:** Higher risk = higher returns BUT bigger drawdowns
#### 2. Reward:Risk Ratio
- **2:1** = More wins needed, hit target faster
- **2.5:1** = Balanced (recommended)
- **3:1** = Fewer wins needed, hold longer
- **4:1** = Very patient, best in trending
**Impact:** Higher R:R = can have lower win rate
#### 3. Minimum Confluence
- **1** = More signals, lower quality
- **2** = Balanced (recommended)
- **3** = Fewer signals, higher quality
- **4** = Very selective
- **5** = Almost never triggers
**Impact:** Higher = fewer but better trades
#### 4. ADX Thresholds
- **Trending: 20-30** (default 25)
- Lower = detect trends earlier
- Higher = only strong trends
- **Ranging: 15-25** (default 20)
- Lower = identify ranging earlier
- Higher = only weak trends
#### 5. Trend Period (SMA)
- **20-50** = Short-term trends
- **50** = Medium-term (default, recommended)
- **100-200** = Long-term trends
**Impact:** Longer period = slower regime changes, more stable
### Optimization Workflow
**Step 1: Baseline**
- Use all default settings
- Test on 3+ years
- Record: Win Rate, PF, Drawdown
**Step 2: Risk Optimization**
- Test 1%, 1.5%, 2%, 2.5%
- Find best risk-adjusted return
- Balance profit vs drawdown
**Step 3: R:R Optimization**
- Test 2:1, 2.5:1, 3:1
- Check which maximizes profit factor
- Consider holding time
**Step 4: Confluence Optimization**
- Test 1, 2, 3
- Find sweet spot for win rate
- Aim for 55-65% win rate
**Step 5: Regime Filter**
- Test with/without trend filter
- Test with/without chaos filter
- Find what works for your asset
---
## REAL TRADING EXAMPLES
### Example 1: Bull Trending - SPY
**Setup:**
- Regime: BULL TRENDING
- Price pulls back from $450 to $445
- EMA20 at $444
- RSI drops to 45
- Confluence: 4/5
**Entry:**
- Price closes at $445.50 (above EMA20)
- LONG signal appears
- Enter at $445.50
**Risk Management:**
- Stop: $443 (2 ATR = $2.50)
- Target: $451.75 (2.5:1 = $6.25)
- Risk: $2.50 per share
- Position: 80 shares (2% of $10k = $200 risk)
**Outcome:**
- Price rallies to $452 in 3 days
- Target hit
- Profit: $6.50 ร 80 = $520
- Return: 2.6 ร risk (excellent)
---
### Example 2: Bear Ranging - AAPL
**Setup:**
- Regime: BEAR RANGING
- Range: $165-$175
- Price rallies to $174
- Resistance at $175
- RSI at 68
- Confluence: 3/5
**Entry:**
- Rejection candle at $174
- SHORT signal appears
- Enter at $173.50
**Risk Management:**
- Stop: $176 (above resistance)
- Target: $166 (support)
- Risk: $2.50
- Position: 80 shares
**Outcome:**
- Price drops to $167 in 2 days
- Target hit
- Profit: $6.50 ร 80 = $520
- Return: 2.6 ร risk
---
### Example 3: Consolidation Breakout - BTC
**Setup:**
- Regime: CONSOLIDATION
- Range: $28,000 - $30,000
- Compressed for 2 weeks
- Volume declining
**Breakout:**
- Price breaks $30,000
- Volume surges 200%
- Close at $30,500
- LONG signal
**Entry:**
- Enter at $30,500
**Risk Management:**
- Stop: $29,500 (back in range)
- Target: $32,000 (range height = $2k)
- Risk: $1,000
- Position: 0.2 BTC ($200 risk on $10k)
**Outcome:**
- Price runs to $33,000
- Target exceeded
- Profit: $2,500 ร 0.2 = $500
- Return: 2.5 ร risk
---
### Example 4: Avoiding Chaos - Tesla
**Setup:**
- Regime: BULL TRENDING
- LONG position from $240
- Elon tweets something crazy
- Regime changes to CHAOS
**Action:**
- EXIT signal appears
- Close position immediately
- Current price: $242 (small profit)
**Outcome:**
- Next 3 days: wild swings
- High $255, Low $230
- By staying out, avoided:
- Potential stop out
- Whipsaw losses
- Stress
**Result:**
- Small profit preserved
- Capital protected
- Re-enter when regime stabilizes
---
## ALERTS SETUP
### Available Alerts
1. **Bull Trending Regime** - Market goes bullish
2. **Bear Trending Regime** - Market goes bearish
3. **Chaos Regime** - High volatility, stay out
4. **Long Entry Signal** - Buy opportunity
5. **Short Entry Signal** - Sell opportunity
6. **Long Exit Signal** - Close long
7. **Short Exit Signal** - Close short
### How to Set Up
1. Click **โฐ (Alert)** icon in TradingView
2. Select **Condition**: Choose indicator + alert type
3. **Options**: Popup, Email, Webhook, etc.
4. **Message**: Customize notification
5. Click **Create**
### Recommended Alert Strategy
**For Active Traders:**
- Long Entry Signal
- Short Entry Signal
- Long Exit Signal
- Short Exit Signal
**For Position Traders:**
- Bull Trending Regime (enter longs)
- Bear Trending Regime (enter shorts)
- Chaos Regime (exit all)
**For Conservative:**
- Only regime change alerts
- Manually review entries
- More selective
---
## TIPS FOR SUCCESS
### 1. Start Small
- Paper trade first
- Then 0.5% risk
- Build to 1-2% over time
### 2. Follow the Regime
- Don't fight it
- Adapt your style
- Different tactics for each
### 3. Trust the Confluence
- 4-5/5 = Best trades
- 2-3/5 = Good trades
- 1/5 = Skip unless desperate
### 4. Respect Exits
- Don't hope and hold
- Cut losses quickly
- Take profits at targets
### 5. Avoid Chaos
- Seriously, just stay out
- Protect your capital
- Wait for clarity
### 6. Keep a Journal
- Record every trade
- Note regime and confluence
- Review weekly
- Learn patterns
### 7. Backtest Thoroughly
- 3+ years minimum
- Multiple market conditions
- Different assets
- Walk-forward test
### 8. Be Patient
- Best setups are rare
- 1-3 trades per week is normal
- Quality over quantity
- Compound over time
---
## COMMON QUESTIONS
**Q: How many trades per month should I expect?**
A: Depends on timeframe and settings. Daily chart: 5-15 trades/month. 4H chart: 15-30 trades/month.
**Q: What's a good win rate?**
A: 55-65% is excellent. 50-55% is good. Below 50% needs adjustment.
**Q: Should I trade all regimes?**
A: Beginners: Only trending. Intermediate: Trending + ranging. Advanced: All except chaos.
**Q: Can I use this on any timeframe?**
A: Best on Daily and 4H. Works on 1H with more noise. Not recommended <1H.
**Q: What if I'm in a trade and regime changes?**
A: Exit immediately (if using indicator) or let strategy handle it automatically.
**Q: How do I know if I'm over-optimizing?**
A: If results are perfect on one period but fail on another. Use walk-forward testing.
**Q: Should I always take 5/5 confluence trades?**
A: Yes, but they're rare (1-2/month). Don't wait only for these.
**Q: Can I combine this with other indicators?**
A: Yes, but keep it simple. RSI, MACD already included. Maybe add volume profile.
**Q: What assets work best?**
A: Liquid stocks, major crypto, futures. Avoid forex spot (use futures), penny stocks.
**Q: How long to hold positions?**
A: Trending: Days to weeks. Ranging: Hours to days. Breakout: Days. Let the regime guide you.
---
## FINAL THOUGHTS
This system gives you:
- โ
Clear market context (regime)
- โ
High-probability entries (confluence)
- โ
Defined exits (automatic signals)
- โ
Adaptable tactics (regime-specific)
- โ
Backtestable results (strategy version)
**Success requires:**
- ๐ Understanding each regime
- ๐ฏ Following the signals
- ๐ช Discipline to wait
- ๐ง Emotional control
- ๐ Proper risk management
**Start your journey:**
1. Load the indicator
2. Watch for 1 week (no trading)
3. Identify regime patterns
4. Paper trade for 1 month
5. Go live with small size
6. Scale up as you gain confidence
**Remember:** The market will always be here. There's no rush. Master one regime at a time, and you'll be profitable in all conditions!
Good luck! ๐
Trinity Real Move Detector DashboardRelease Notes (critical)
1. This code "will" require tweaks for different timeframes to the multiplier, do not assume the data in the table is accurate, cross check it with the Trinity Real Move Detector or another ATR tool, to validate the values in the table and ensure you have set the correct values.
2. I mention this below. But please understand that pine code has a limitation in the number of security calls (40 request.security() calls per script). This code is on the limit of that threshold and I would encourage developers to see if they can find a way around this to improve the script and release further updates.
What do we have...
The Trinity Real Move Detector Dashboard is a powerful TradingView indicator designed to scan multiple assets at once and show when each one has genuine short-term volatility "energy" โ the kind that makes directional options trades (especially 0DTE or short-dated) have a high probability of follow-through, and can be used for swing trading as well. It combines a simple ATR-based volatility filter with a SuperTrend-style bias to tell you not only if the market is "awake" but also in which direction the momentum is leaning.
At its core, the indicator calculates the current ATR on your chosen timeframe and compares it to a user-defined percentage of the asset's daily ATR. When the short-term ATR spikes above that threshold, it signals "enough energy" โ meaning the underlying is moving with real force rather than choppy noise. The SuperTrend logic then determines bullish or bearish bias, so the status shows "BULLISH ENERGY" (green) or "BEARISH ENERGY" (red) when energy is on, or "WAIT" when it's not. It also counts how many bars the energy has been active and shows the current ATR vs threshold for quick visual confirmation.
The dashboard displays all this in a clean table with columns for Symbol, Multiplier, Current ATR, Threshold, Status, Bars Active, and Bias (UP/DOWN). It's perfect for 3-minute charts but works on any timeframe โ just adjust the multiplier based on the hints in the settings.
Editing symbols and multipliers is straightforward and user-friendly. In the indicator settings, you'll see numbered inputs like "1. Symbol - NVDA" and "1. Multiplier". To change an asset, simply type the new ticker in the symbol field (e.g., replace "NVDA" with "TSLA", "AVGO", or "ADAUSD"). You can also adjust the multiplier for each asset individually in the corresponding "Multiplier" field to make it more or less sensitive โ lower numbers give more signals, higher numbers give stricter, higher-quality ones. This lets you customize the dashboard to your watchlist without any coding. For example, if you switch to a 4-hour chart or a slower-moving stock like AVGO, you may need to raise the multiplier (e.g., to 0.3โ0.4) to avoid false "bullish" signals during minor bounces in a larger downtrend.
One important note about the multiplier and timeframes: the default values are optimized for fast intraday charts (like 3-minute or 5-minute). On higher timeframes (15-minute, 1-hour, 4-hour, or daily), the SuperTrend bias can be too sensitive with low multipliers (1.0 default in the code), leading to situations like the AVGO 4-hour example โ where price is clearly downtrending, but the dashboard shows "BULLISH ENERGY" because the tight bands flip on small bounces. To fix this, you need to manually increase the multiplier for that asset (or all assets) in the settings. For 4-hour or daily charts, 0.25โ0.35 is often better to match smoother SuperTrend indicators like Trinity. Always test on your timeframe and asset โ crypto usually needs slightly lower multipliers than stocks due to higher volatility.
TradingView has a hard limit of 40 request.security() calls per script. Each asset in the dashboard requires several calls (current ATR, daily ATR, SuperTrend components, etc.), so with the full ATR-based bias, you can safely monitor about 6โ8 assets before hitting the limit. Adding more symbols increases the number of calls and will trigger the "too many securities" error. This is a platform restriction to prevent excessive server load, and there's no official way around it in a single script. Some advanced coders use tricks like caching or lower-timeframe requests to squeeze in a few more, but for reliability, sticking to 6โ8 assets is recommended. If you need more, the common workaround is to create two separate indicators (e.g., one for stocks, one for crypto) and add both to the same chart.
Overall, this dashboard gives you a professional-grade multi-asset scanner that filters out low-energy noise and highlights real momentum opportunities across stocks and crypto โ all in one glance. It's especially valuable for options traders who want to avoid theta decay on weak moves and only strike when the market has true fuel. By tweaking the per-symbol multipliers in the settings, you can perfectly adapt it to any timeframe or asset behavior, avoiding issues like the AVGO false bullish signal on higher timeframes.
EMA Slope Angle# EMA Slope Angle Indicator
A professional, non-repainting overlay indicator that visualizes EMA slope strength as an angle in degrees, providing instant visual feedback through dynamic EMA coloring and comprehensive trend analysis.
## ORIGINALITY
This indicator is original in its approach to slope measurement:
- **Angle-based calculation**: Uses arctangent to calculate slope as an angle in degrees (not percentage), providing a more intuitive measure of trend strength
- **Dynamic visual feedback**: Combines real-time EMA line coloring with regime detection, creating a continuous visual representation of market conditions
- **Comprehensive analysis**: Integrates angle-based trend shift signals with optional statistical analysis in a single, cohesive tool
- **Non-repainting design**: All calculations use confirmed bars only, ensuring reliable, deterministic output
## HOW IT WORKS
The indicator calculates the EMA slope angle using trigonometric functions:
```
Angle = arctan((EMA_current - EMA_past) / lookback_bars) ร 180/ฯ
```
This provides an intuitive measure where:
- **Steep angles** = strong trends (visualized with saturated colors)
- **Shallow angles** = weak trends (visualized with lighter colors)
- **Near-zero angles** = flat/consolidation (visualized in gray)
The EMA line color dynamically reflects:
- **Direction**: Green shades for uptrends, red shades for downtrends
- **Strength**: Color intensity based on normalized angle (stronger slopes = more saturated colors)
- **Regime**: Gray for flat conditions when angle is below threshold
## KEY FEATURES
### Dynamic EMA Coloring
- EMA line color changes continuously based on slope strength
- Color intensity reflects trend strength (50-100% opacity range)
- Instant visual feedback without cluttering the chart
### Regime Detection
- Automatically classifies market conditions: **RISING**, **FALLING**, or **FLAT**
- Configurable angle thresholds for regime classification
- Real-time regime updates on confirmed bars only
### Trend-Shift Signals
- Detects transitions from FLAT to RISING/FALLING regimes
- Visual arrows on chart when significant trend shifts occur
- Prevents signal spam by only triggering from FLAT state
- Configurable trigger thresholds for signal sensitivity
### KPI Dashboard
- Real-time angle display (rounded to 1 decimal place)
- Current regime status with color coding
- Last signal tracking (UP/DOWN/NONE)
- Positioned in top-right corner for easy reference
### Advanced Angle Statistics (Optional)
- Detailed breakdown of angle distribution across 9 granular buckets:
- 0-0.2ยฐ, 0.2-0.5ยฐ, 0.5-1ยฐ, 1-1.5ยฐ, 1.5-2ยฐ, 2-3ยฐ, 3-5ยฐ, 5-10ยฐ, >10ยฐ
- Shows count and percentage for each bucket
- Automatically resets on symbol/timeframe changes
- Useful for analyzing historical slope patterns
## SETTINGS
### Main Settings
- **EMA Length**: Period for exponential moving average (default: 50)
- **Slope Lookback Bars**: Number of bars to compare for slope calculation (default: 5)
### Angle Settings
- **Flat Angle Threshold**: Maximum angle for FLAT regime classification (default: 2.0ยฐ)
- **Rising Angle Trigger**: Minimum angle to trigger RISING regime and UP signals (default: 1.0ยฐ)
- **Falling Angle Trigger**: Maximum angle to trigger FALLING regime and DOWN signals (default: -1.0ยฐ)
- **Max Angle for Color Saturation**: Maximum angle for full color intensity (default: 30.0ยฐ)
### Display Options
- **Uptrend Color**: Color for rising trends (default: dark green)
- **Downtrend Color**: Color for falling trends (default: dark red)
- **Flat Color**: Color for flat conditions (default: gray)
- **Show Trend-Shift Signals**: Toggle signal arrows on/off (default: true)
- **Show Angle Statistics**: Toggle statistics dashboard on/off (default: false)
## NON-REPAINTING GUARANTEE
- All calculations use confirmed bars only (`barstate.isconfirmed`)
- No future bar references
- No higher timeframe calls using `request.security()`
- Deterministic output - what you see is what you get
- Reliable for backtesting and live trading
## USE CASES
- **Trend Identification**: Instantly identify trend strength and direction at a glance
- **Reversal Detection**: Spot trend reversals early through regime changes
- **Trade Filtering**: Filter trades based on slope strength and regime
- **Consolidation Monitoring**: Identify flat market conditions for range trading
- **Pattern Analysis**: Study historical angle distributions to understand market behavior
- **Momentum Assessment**: Gauge trend momentum through visual color intensity
## LIMITATIONS
- Angle calculation depends on EMA length and lookback period settings
- Regime classification is based on configurable thresholds - adjust to match your trading style
- Signals only trigger when transitioning from FLAT state to prevent spam
- Statistics reset on symbol/timeframe changes (by design)
- Color intensity is normalized to max angle setting - adjust for your market's typical ranges
## TECHNICAL NOTES
- Uses Pine Script v6
- Overlay indicator (plots on price chart)
- No external dependencies
- Compatible with all TradingView chart types
- Works on all timeframes and symbols
## DISCLAIMER
This indicator is designed for visual trend analysis and educational purposes. Always combine with other technical analysis tools, fundamental analysis, and proper risk management strategies. Past performance does not guarantee future results. Trading involves risk of loss.
---
**Perfect for**: Swing traders, day traders, trend followers, and market analysts seeking intuitive trend strength visualization.
P6โๆบ่ฝ่ต้ๆฆๅฟตไบคๆ็ณป็ป//@version=5
indicator("P6โๆบ่ฝ่ต้ๆฆๅฟตไบคๆ็ณป็ป", overlay=true, max_boxes_count = 500, max_labels_count = 500)
// === ๅๆฐๅ็ฑปๆ ้ข ===
// --------------------------
// 1. ๅบ็กๆๆ ่ฎพ็ฝฎ
// --------------------------
// 2. ่ๅด่ฟๆปคๅจ ่ฎพ็ฝฎ
// --------------------------
// 3. ADX ่ถๅฟ่ฟๆปคๅจ ่ฎพ็ฝฎ
// --------------------------
// 4. ่ถๅฟ็บฟ ่ฎพ็ฝฎ
// --------------------------
// 5. ๆฏๆไธ้ปๅ ่ฎพ็ฝฎ
// --------------------------
// 6. PMA ่ฎพ็ฝฎ
// --------------------------
// 7. ไบคๆไฟกๆฏ่กจๆ ผ ่ฎพ็ฝฎ
// --------------------------
// 8. ้กถ้จ่ง้ฟ ่ฎพ็ฝฎ
// --------------------------
// 9. ๅบ้จ่ง้ฟ ่ฎพ็ฝฎ
// --------------------------
// 10. RSI ๅจ้ๆๆ ่ฎพ็ฝฎ
// --------------------------
// 11. ๅคๆถ้ดๆกๆถ ่ฎพ็ฝฎ
// --------------------------
// === ๆพ็คบ/้่้้กน ===
showRangeFilter = input.bool(true, title="ๆพ็คบ ่ๅด่ฟๆปคๅจ", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showADXFilter = input.bool(true, title="ๅฏ็จ ADX ่ถๅฟ่ฟๆปคๅจ", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showTrendLines = input.bool(false, title="ๆพ็คบ ่ถๅฟ็บฟ", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showSupRes = input.bool(true, title="ๆพ็คบ ๆฏๆไธ้ปๅ", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showPMA = input.bool(true, title="ๆพ็คบ ๅคๅจๆ็งปๅจๅนณๅ็บฟ", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showTable = input.bool(true, title="ๆพ็คบ ไบคๆไฟกๆฏ่กจๆ ผ", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showTopAvoidance = input.bool(false, title="ๅฏ็จ ้กถ้จ่ง้ฟ็ณป็ป", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showBottomAvoidance = input.bool(false, title="ๅฏ็จ ๅบ้จ่ง้ฟ็ณป็ป", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showRSI = input.bool(false, title="ๅฏ็จ RSI ๅจ้ๆๆ ", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
showMTF = input.bool(true, title="ๅฏ็จ ๅคๆถ้ดๆกๆถๅๆ", group="1. ๅบ็กๆๆ ่ฎพ็ฝฎ")
// === RSI ๅจ้ๆๆ ่ฎพ็ฝฎ ===
rsiLength = input.int(14, title="RSI ๅจๆ", minval=1, group="10. RSI ๅจ้ๆๆ ่ฎพ็ฝฎ")
rsiOverbought = input.float(70.0, title="่ถ
ไนฐ้ๅผ", minval=50, maxval=90, step=1, group="10. RSI ๅจ้ๆๆ ่ฎพ็ฝฎ")
rsiOversold = input.float(30.0, title="่ถ
ๅ้ๅผ", minval=10, maxval=50, step=1, group="10. RSI ๅจ้ๆๆ ่ฎพ็ฝฎ")
rsiNeutralUpper = input.float(60.0, title="ไธญๆงๅบ้ดไธๆฒฟ", minval=50, maxval=70, step=1, group="10. RSI ๅจ้ๆๆ ่ฎพ็ฝฎ")
rsiNeutralLower = input.float(40.0, title="ไธญๆงๅบ้ดไธๆฒฟ", minval=30, maxval=50, step=1, group="10. RSI ๅจ้ๆๆ ่ฎพ็ฝฎ")
// === ๅคๆถ้ดๆกๆถ่ฎพ็ฝฎ ===
mtfEnable1m = input.bool(true, title="ๅฏ็จ 1ๅ้", group="11. ๅคๆถ้ดๆกๆถ ่ฎพ็ฝฎ")
mtfEnable5m = input.bool(true, title="ๅฏ็จ 5ๅ้", group="11. ๅคๆถ้ดๆกๆถ ่ฎพ็ฝฎ")
mtfEnable15m = input.bool(true, title="ๅฏ็จ 15ๅ้", group="11. ๅคๆถ้ดๆกๆถ ่ฎพ็ฝฎ")
mtfEnable1h = input.bool(true, title="ๅฏ็จ 1ๅฐๆถ", group="11. ๅคๆถ้ดๆกๆถ ่ฎพ็ฝฎ")
mtfEnable4h = input.bool(true, title="ๅฏ็จ 4ๅฐๆถ", group="11. ๅคๆถ้ดๆกๆถ ่ฎพ็ฝฎ")
// === RSI ่ฎก็ฎไธ็ถๆๅคๆญ ===
rsiValue = ta.rsi(close, rsiLength)
rsiPrevious = ta.rsi(close , rsiLength)
// RSI ๅจ้็ถๆๅคๆญ
getRSIStatus() =>
status = "ๅจ้ไธญๆง"
// ๅจ้ๅ่ฝๆกไปถ๏ผRSIไป้ซไฝไธ้ๆๅคไบไธ้่ถๅฟ
fallCondition1 = rsiValue < rsiPrevious and rsiValue > rsiNeutralUpper
fallCondition2 = rsiValue >= rsiOverbought and rsiValue < rsiPrevious
fallCondition3 = rsiPrevious >= rsiOverbought and rsiValue < rsiOverbought and rsiValue < rsiPrevious
if fallCondition1 or fallCondition2 or fallCondition3
status := "ๅจ้ๅ่ฝ"
// ๅจ้ๅๅๆกไปถ๏ผRSIไปไฝไฝไธๅๆๅคไบไธๅ่ถๅฟ
riseCondition1 = rsiValue > rsiPrevious and rsiValue < rsiNeutralLower
riseCondition2 = rsiValue <= rsiOversold and rsiValue > rsiPrevious
riseCondition3 = rsiPrevious <= rsiOversold and rsiValue > rsiOversold and rsiValue > rsiPrevious
if riseCondition1 or riseCondition2 or riseCondition3
status := "ๅจ้ๅๅ"
// ๅจ้ไธญๆงๆกไปถ๏ผRSIๅจไธญๆงๅบ้ดๆๆ ๆ็กฎ่ถๅฟ
if rsiValue >= rsiNeutralLower and rsiValue <= rsiNeutralUpper
status := "ๅจ้ไธญๆง"
status
rsiStatus = getRSIStatus()
// RSI ไฟกๅทไธๅ
ถไปๆๆ ็ปๅ
rsiSupportsBuy = rsiStatus == "ๅจ้ๅๅ" or (rsiValue <= rsiOversold and rsiValue > rsiPrevious)
rsiSupportssell = rsiStatus == "ๅจ้ๅ่ฝ" or (rsiValue >= rsiOverbought and rsiValue < rsiPrevious)
// === ๅคๆถ้ดๆกๆถๆฐๆฎ่ทๅ ===
// ็ฎๅ็ๅคๆถ้ดๆกๆถ่ถๅฟ่ฎก็ฎ
calcSimpleTrend(src) =>
ema21 = ta.ema(src, 21)
ema50 = ta.ema(src, 50)
trend = src > ema21 and ema21 > ema50 ? 1 : src < ema21 and ema21 < ema50 ? -1 : 0
trend
// ่ทๅๅๆถ้ดๆกๆถ็่ถๅฟๆฐๆฎ
trend1m = showMTF and mtfEnable1m ? request.security(syminfo.tickerid, "1", calcSimpleTrend(close)) : 0
trend5m = showMTF and mtfEnable5m ? request.security(syminfo.tickerid, "5", calcSimpleTrend(close)) : 0
trend15m = showMTF and mtfEnable15m ? request.security(syminfo.tickerid, "15", calcSimpleTrend(close)) : 0
trend1h = showMTF and mtfEnable1h ? request.security(syminfo.tickerid, "60", calcSimpleTrend(close)) : 0
trend4h = showMTF and mtfEnable4h ? request.security(syminfo.tickerid, "240", calcSimpleTrend(close)) : 0
// === ๅคๆถ้ดๆกๆถ่ถๅฟๅคๆญๅฝๆฐ ===
getTrendDirection(trend) =>
if trend > 0
"ๅคๅคดๅพๅ"
else if trend < 0
"็ฉบๅคดๅพๅ"
else
"้่ก"
// ่ทๅๅๆถ้ดๆกๆถ่ถๅฟๆนๅ
trend1mDir = getTrendDirection(trend1m)
trend5mDir = getTrendDirection(trend5m)
trend15mDir = getTrendDirection(trend15m)
trend1hDir = getTrendDirection(trend1h)
trend4hDir = getTrendDirection(trend4h)
// === ้กถ้จ่ง้ฟ็ณป็ป ===
ma_period_top = input.int(10, 'MA Period (Length)', group='8. ้กถ้จ่ง้ฟ ่ฎพ็ฝฎ')
topThreshold = input.int(85, 'VAR้กถ้จ้ๅผ', minval=70, maxval=95, step=1, group='8. ้กถ้จ่ง้ฟ ่ฎพ็ฝฎ')
// ่ฎก็ฎVARๆๆ - ้กถ้จ๏ผๆฃๆตไธๆถจๅจ่ฝ๏ผ
pre_price_top = close
VAR_top = ta.sma(math.max(close-pre_price_top,0), ma_period_top) / ta.sma(math.abs(close-pre_price_top), ma_period_top) * 100
// ้กถ้จไฟกๅท - ๅฝไธๆถจๅจ่ฝ่พพๅฐ้ซไฝๆถ
isTop = VAR_top > topThreshold and VAR_top <= topThreshold
// ๅพ่กจๆพ็คบ้กถ้จๆ ่ฎฐ
plotshape(series=showTopAvoidance and isTop, title="้กถ", style=shape.labeldown, location=location.abovebar,
color=color.new(color.purple, 0), textcolor=color.white, size=size.normal, text="้กถ")
// === ๅบ้จ่ง้ฟ็ณป็ป ===
ma_period_bottom = input.int(14, 'MA Period (Length)', group='9. ๅบ้จ่ง้ฟ ่ฎพ็ฝฎ')
bottomThreshold = input.int(15, 'VARๅบ้จ้ๅผ', minval=5, maxval=30, step=1, group='9. ๅบ้จ่ง้ฟ ่ฎพ็ฝฎ')
// ่ฎก็ฎVARๆๆ - ๅบ้จ๏ผๆฃๆตไธ่ทๅจ่ฝ๏ผ
pre_price_bottom = close
VAR_bottom = ta.sma(math.max(pre_price_bottom-close,0), ma_period_bottom) / ta.sma(math.abs(close-pre_price_bottom), ma_period_bottom) * 100
// ๅบ้จไฟกๅท - ๅฝไธ่ทๅจ่ฝ่พพๅฐ้ซไฝๆถ
isBottom = VAR_bottom > bottomThreshold and VAR_bottom <= bottomThreshold
// ๅพ่กจๆพ็คบๅบ้จๆ ่ฎฐ
plotshape(series=showBottomAvoidance and isBottom, title="ๅบ", style=shape.labelup, location=location.belowbar,
color=color.new(color.orange, 0), textcolor=color.white, size=size.normal, text="ๅบ")
// === ่ๅด่ฟๆปคๅจ ้จๅ ===
upColor = color.white
midColor = #90bff9
downColor = color.blue
src = input(defval=close, title="ๆฐๆฎๆบ", group="2. ่ๅด่ฟๆปคๅจ ่ฎพ็ฝฎ")
per = input.int(defval=100, minval=1, title="้ๆ ทๅจๆ", group="2. ่ๅด่ฟๆปคๅจ ่ฎพ็ฝฎ")
mult = input.float(defval=3.0, minval=0.1, title="ๅบ้ดๅๆฐ", group="2. ่ๅด่ฟๆปคๅจ ่ฎพ็ฝฎ")
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
smoothrng
smrng = smoothrng(src, per, mult)
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt ) ? x - r < nz(rngfilt ) ? nz(rngfilt ) : x - r :
x + r > nz(rngfilt ) ? nz(rngfilt ) : x + r
rngfilt
filt = rngfilt(src, smrng)
upward = 0.0
upward := filt > filt ? nz(upward ) + 1 : filt < filt ? 0 : nz(upward )
downward = 0.0
downward := filt < filt ? nz(downward ) + 1 : filt > filt ? 0 : nz(downward )
hband = filt + smrng
lband = filt - smrng
filtcolor = upward > 0 ? upColor : downward > 0 ? downColor : midColor
barcolor_ = src > filt and src > src and upward > 0 ? upColor :
src > filt and src < src and upward > 0 ? upColor :
src < filt and src < src and downward > 0 ? downColor :
src < filt and src > src and downward > 0 ? downColor : midColor
longCond = bool(na)
shortCond = bool(na)
longCond := src > filt and src > src and upward > 0 or
src > filt and src < src and upward > 0
shortCond := src < filt and src < src and downward > 0 or
src < filt and src > src and downward > 0
CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni
// === ADX ่ถๅฟ่ฟๆปคๅจ ้จๅ ===
adxLength = input.int(defval=14, minval=1, title="ADX ๅจๆ", group="3. ADX ่ถๅฟ่ฟๆปคๅจ ่ฎพ็ฝฎ")
adxThreshold = input.float(defval=25.0, minval=0, maxval=100, step=0.5, title="ADX ้ๅผ", tooltip="ADXๅคงไบๆญคๅผๆๅ
่ฎธไบคๆไฟกๅท", group="3. ADX ่ถๅฟ่ฟๆปคๅจ ่ฎพ็ฝฎ")
// ็ฎๅ็ADX่ฎก็ฎ - ๆดๅ็กฎ็ๆนๆณ
calcADX(len) =>
up = ta.change(high)
down = -ta.change(low)
plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
truerange = ta.rma(ta.tr, len)
plus = fixnan(100 * ta.rma(plusDM, len) / truerange)
minus = fixnan(100 * ta.rma(minusDM, len) / truerange)
sum = plus + minus
adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), len)
= calcADX(adxLength)
// ADX็ถๆๅคๆญ
adxStrong = adxValue >= adxThreshold
adxTrendUp = diPlus > diMinus
adxTrendDown = diMinus > diPlus
// ไฟฎๆนไฟกๅท็ๆ้ป่พ๏ผๅ ๅ
ฅ้กถ้จๅๅบ้จ่ง้ฟไปฅๅRSI็กฎ่ฎค
longCondition = longCond and CondIni == -1 and (not showADXFilter or adxStrong) and (not showTopAvoidance or not isTop) and (not showRSI or rsiSupportsBuy)
shortCondition = shortCond and CondIni == 1 and (not showADXFilter or adxStrong) and (not showBottomAvoidance or not isBottom) and (not showRSI or rsiSupportssell)
// === ่ฎฐๅฝไนฐๅไฟกๅทไปทๆ ผ ===
var float entryPrice = na
var string entryType = na
var float entryTime = na
// ๅฝๅบ็ฐไนฐๅ
ฅไฟกๅทๆถ่ฎฐๅฝ
if longCondition
entryPrice := close
entryType := "ๅคๅ"
entryTime := time
// ๅฝๅบ็ฐๅๅบไฟกๅทๆถ่ฎฐๅฝ
if shortCondition
entryPrice := close
entryType := "็ฉบๅ"
entryTime := time
// === ่ถๅฟ้ข่ฒ้ป่พ ===
var trendColor = color.gray
if longCondition
trendColor := color.green
else if shortCondition
trendColor := color.red
// ADX็บฟ็ปๅถ๏ผๅฏ้๏ผ- ๅทฒ้่ๆพ็คบ
adxColor = adxStrong ? (adxTrendUp ? color.green : color.red) : color.gray
// plot(showADXLine and showADXFilter ? adxValue : na, title="ๅนณๅๆนๅๆๆฐ", color=adxColor, linewidth=1)
// hline(showADXLine and showADXFilter ? adxThreshold : na, title="ADX้ๅผ็บฟ", color=color.yellow, linestyle=hline.style_dashed)
// ็ปๅพ้จๅ - ๅทฒ้่็บฟๆกๆพ็คบ๏ผไฟ็ๅ่ฝ
// filtplot = plot(showRangeFilter ? filt : na, color=trendColor, linewidth=2, title="ๅบ้ด่ฟๆปคๅจ")
// hbandplot = plot(showRangeFilter ? hband : na, color=color.new(trendColor, 30), title="ไธ่ฝจ็บฟ", linewidth=1)
// lbandplot = plot(showRangeFilter ? lband : na, color=color.new(trendColor, 30), title="ไธ่ฝจ็บฟ", linewidth=1)
// barcolor(na) - ๅทฒ้่K็บฟ้ข่ฒ
plotshape(showRangeFilter and longCondition, title="ไนฐๅ
ฅไฟกๅท", text="ไนฐ", textcolor=color.white, style=shape.labelup, size=size.small, location=location.belowbar, color=color.new(color.green, 20))
plotshape(showRangeFilter and shortCondition, title="ๅๅบไฟกๅท", text="ๅ", textcolor=color.white, style=shape.labeldown, size=size.small, location=location.abovebar, color=color.new(color.red, 20))
// === ่ถๅฟ็บฟ ้จๅ ===
length_tl = input.int(14, 'ๅๅๅๆบฏ้ฟๅบฆ', group="4. ่ถๅฟ็บฟ ่ฎพ็ฝฎ")
mult_tl = input.float(1., 'ๆ็็ณปๆฐ', minval = 0, step = .1, group="4. ่ถๅฟ็บฟ ่ฎพ็ฝฎ")
calcMethod = input.string('ๅนณๅ็ๅฎๆณขๅน
', 'ๆ็่ฎก็ฎๆนๆณ', options = , group="4. ่ถๅฟ็บฟ ่ฎพ็ฝฎ")
backpaint = input(true, tooltip = 'ๅๆบฏๆพ็คบ๏ผๅฐๅฏ่งๅ
็ด ๅๅๅฒๅ็งป๏ผ็ฆ็จๅๅฏๆฅ็ๅฎๆถไฟกๅทใ', group="4. ่ถๅฟ็บฟ ่ฎพ็ฝฎ")
upCss = input.color(color.teal, 'ไธๅ่ถๅฟ็บฟ้ข่ฒ', group = "4. ่ถๅฟ็บฟ ่ฎพ็ฝฎ")
dnCss = input.color(color.red, 'ไธ้่ถๅฟ็บฟ้ข่ฒ', group = "4. ่ถๅฟ็บฟ ่ฎพ็ฝฎ")
showExt = input(true, 'ๆพ็คบๅปถ้ฟ็บฟ', group="4. ่ถๅฟ็บฟ ่ฎพ็ฝฎ")
var upper_tl = 0.
var lower_tl = 0.
var slope_ph_tl = 0.
var slope_pl_tl = 0.
var offset_tl = backpaint ? length_tl : 0
n = bar_index
src_tl = close
ph = ta.pivothigh(length_tl, length_tl)
pl = ta.pivotlow(length_tl, length_tl)
slope = switch calcMethod
'ๅนณๅ็ๅฎๆณขๅน
' => ta.atr(length_tl) / length_tl * mult_tl
'ๆ ๅๅทฎ' => ta.stdev(src_tl, length_tl) / length_tl * mult_tl
'็บฟๆงๅๅฝ' => math.abs(ta.sma(src_tl * n, length_tl) - ta.sma(src_tl, length_tl) * ta.sma(n, length_tl)) / ta.variance(n, length_tl) / 2 * mult_tl
slope_ph_tl := ph ? slope : slope_ph_tl
slope_pl_tl := pl ? slope : slope_pl_tl
upper_tl := ph ? ph : upper_tl - slope_ph_tl
lower_tl := pl ? pl : lower_tl + slope_pl_tl
var upos = 0
var dnos = 0
upos := ph ? 0 : close > upper_tl - slope_ph_tl * length_tl ? 1 : upos
dnos := pl ? 0 : close < lower_tl + slope_pl_tl * length_tl ? 1 : dnos
var uptl = line.new(na,na,na,na, color = upCss, style = line.style_dashed, extend = extend.right)
var dntl = line.new(na,na,na,na, color = dnCss, style = line.style_dashed, extend = extend.right)
if ph and showExt and showTrendLines
line.set_xy1(uptl, n-offset_tl, backpaint ? ph : upper_tl - slope_ph_tl * length_tl)
line.set_xy2(uptl, n-offset_tl+1, backpaint ? ph - slope : upper_tl - slope_ph_tl * (length_tl+1))
if pl and showExt and showTrendLines
line.set_xy1(dntl, n-offset_tl, backpaint ? pl : lower_tl + slope_pl_tl * length_tl)
line.set_xy2(dntl, n-offset_tl+1, backpaint ? pl + slope : lower_tl + slope_pl_tl * (length_tl+1))
plot(showTrendLines ? (backpaint ? upper_tl : upper_tl - slope_ph_tl * length_tl) : na, 'ไธๅ่ถๅฟ็บฟ', color = ph ? na : upCss, offset = -offset_tl)
plot(showTrendLines ? (backpaint ? lower_tl : lower_tl + slope_pl_tl * length_tl) : na, 'ไธ้่ถๅฟ็บฟ', color = pl ? na : dnCss, offset = -offset_tl)
// ่ถๅฟ็บฟ็ช็ ดไน้่ฆADX็กฎ่ฎค๏ผๅนถๅ ๅ
ฅ้กถ้จๅๅบ้จ่ง้ฟไปฅๅRSI็กฎ่ฎค
trendLineBuySignal = showTrendLines and upos > upos and (not showADXFilter or adxStrong) and (not showTopAvoidance or not isTop) and (not showRSI or rsiSupportsBuy)
trendLineSellSignal = showTrendLines and dnos > dnos and (not showADXFilter or adxStrong) and (not showBottomAvoidance or not isBottom) and (not showRSI or rsiSupportssell)
plotshape(trendLineBuySignal ? low : na, "ไธ่ฝจ็ช็ ด"
, shape.labelup
, location.absolute
, upCss
, text = "็ช"
, textcolor = color.white
, size = size.tiny)
plotshape(trendLineSellSignal ? high : na, "ไธ่ฝจ็ช็ ด"
, shape.labeldown
, location.absolute
, dnCss
, text = "็ช"
, textcolor = color.white
, size = size.tiny)
alertcondition(trendLineBuySignal, 'ไธ่ฝจ็ช็ ด', 'ไปทๆ ผๅไธ็ช็ ดไธ่ถๅฟ็บฟ')
alertcondition(trendLineSellSignal, 'ไธ่ฝจ็ช็ ด', 'ไปทๆ ผๅไธ็ช็ ดไธ่ถๅฟ็บฟ')
// === ๆฏๆไธ้ปๅ ้จๅ ===
g_sr = '5. ๆฏๆไธ้ปๅ'
g_c = 'ๆกไปถ'
g_st = 'ๆ ทๅผ'
t_r = 'K็บฟ็กฎ่ฎค๏ผไป
ๅจK็บฟๆถ็ๆถ็ๆ่ญฆๆฅ๏ผๅปถๅ1ๆ นK็บฟ๏ผใ\n\n้ซ็นไธไฝ็น๏ผ้ป่ฎคๆ
ๅตไธ๏ผ็ช็ ด/ๅ่ธฉ็ณป็ปไฝฟ็จๅฝๅๆถ็ไปทๅคๆญ๏ผ้ๆฉ้ซ็นไธไฝ็นๅๅฐไฝฟ็จ้ซไฝ็นๅคๆญๆกไปถ๏ผไธๅ้็ป๏ผ็ปๆไผไธๅใ'
t_rv = 'ๆฏๅฝๆฃๆตๅฐๆฝๅจๅ่ธฉๆถ๏ผๆๆ ไผๅคๆญๅ่ธฉไบไปถๅณๅฐๅ็ใๆญค่พๅ
ฅ็จไบ่ฎพ็ฝฎๅจๆฝๅจๅ่ธฉๆฟๆดปๆถ๏ผๆๅคงๅ
่ฎธๆฃๆตๅคๅฐๆ นK็บฟใ\n\nไพๅฆ๏ผๅบ็ฐๆฝๅจๅ่ธฉๆ ็ญพๆถ๏ผ่ฏฅๆ ็ญพๅ
่ฎธๅญๅจๅคๅฐๆ นK็บฟไปฅ็กฎ่ฎคๅ่ธฉ๏ผๆญคๅ่ฝ้ฒๆญขๅ่ธฉ่ญฆๆฅๅจ10ๆ นK็บฟๅๆ่งฆๅๅฏผ่ดไธๅ็กฎใ'
input_lookback = input.int(defval = 20, title = 'ๅๆบฏๅบ้ด', minval = 1, tooltip = 'ๆฃๆตๅๅไบไปถ็K็บฟๆฐ้ใ', group = g_sr)
input_retSince = input.int(defval = 2, title = '็ช็ ดๅK็บฟๆฐ', minval = 1, tooltip = '็ช็ ดๅๅคๅฐๆ นK็บฟๅ
ๆฃๆตๅ่ธฉใ', group = g_sr)
input_retValid = input.int(defval = 2, title = 'ๅ่ธฉๆฃๆต้ๅถ', minval = 1, tooltip = t_rv, group = g_sr)
input_breakout = input.bool(defval = true, title = 'ๆพ็คบ็ช็ ด', group = g_c)
input_retest = input.bool(defval = true, title = 'ๆพ็คบๅ่ธฉ', group = g_c)
input_repType = input.string(defval = 'ๅผๅฏ', title = '้็ปๆจกๅผ', options = , tooltip = t_r, group = g_c)
input_outL = input.string(defval = line.style_dotted, title = '่พนๆกๆ ทๅผ', group = g_st, options = )
input_extend = input.string(defval = extend.none, title = 'ๅปถ้ฟๆนๅ', group = g_st, options = )
input_labelType = input.string(defval = '่ฏฆ็ป', title = 'ๆ ็ญพ็ฑปๅ', options = , group = g_st)
input_labelSize = input.string(defval = size.small, title = 'ๆ ็ญพๅคงๅฐ', options = , group = g_st)
st_break_lb_co1 = input.color(defval = color.lime , title = '็ฉบๅคด็ช็ ดๆ ็ญพ้ข่ฒ' ,inline = 'st_break_lb_co', group = g_st)
st_break_lb_co2 = input.color(defval = color.new(color.lime,40) , title = '' ,inline = 'st_break_lb_co', group = g_st)
lg_break_lb_co1 = input.color(defval = color.red , title = 'ๅคๅคด็ช็ ดๆ ็ญพ้ข่ฒ' ,inline = 'lg_break_lb_co', group = g_st)
lg_break_lb_co2 = input.color(defval = color.new(color.red,40) , title = '' ,inline = 'lg_break_lb_co', group = g_st)
st_retest_lb_co1 = input.color(defval = color.lime , title = '็ฉบๅคดๅ่ธฉๆ ็ญพ้ข่ฒ' ,inline = 'st_retest_lb_col', group = g_st)
st_retest_lb_co2 = input.color(defval = color.new(color.lime,40) , title = '' ,inline = 'st_retest_lb_col', group = g_st)
lg_retest_lb_co1 = input.color(defval = color.red , title = 'ๅคๅคดๅ่ธฉๆ ็ญพ้ข่ฒ' ,inline = 'lg_retest_lb_co', group = g_st)
lg_retest_lb_co2 = input.color(defval = color.new(color.red,40) , title = '' ,inline = 'lg_retest_lb_co', group = g_st)
input_plColor1 = input.color(defval = color.lime, title = 'ๆฏๆๆนๆก้ข่ฒ', inline = 'pl_Color', group = g_st)
input_plColor2 = input.color(defval = color.new(color.lime,85), title = '', inline = 'pl_Color', group = g_st)
input_phColor1 = input.color(defval = color.red, title = '้ปๅๆนๆก้ข่ฒ', inline = 'ph_Color', group = g_st)
input_phColor2 = input.color(defval = color.new(color.red,85), title = '', inline = 'ph_Color', group = g_st)
input_override = input.bool(defval = false, title = '่ชๅฎไนๆๅญ้ข่ฒ', inline = '่ฆ็', group = g_st)
input_textColor = input.color(defval = color.white, title = '', inline = '่ฆ็', group = g_st)
bb = input_lookback
// ๅ
ผๅฎนlabelไธ่ฑๆ้้กน
rTon = input_repType == 'ๅผๅฏ'
rTcc = input_repType == 'ๅ
ณ้ญ:K็บฟ็กฎ่ฎค'
rThv = input_repType == 'ๅ
ณ้ญ:้ซไฝ็น'
breakText = input_labelType == '็ฎๆด' ? '็ช' : '็ช็ ด'
// ๅๅ
rs_pl = fixnan(ta.pivotlow(low, bb, bb))
rs_ph = fixnan(ta.pivothigh(high, bb, bb))
// Box ้ซๅบฆ
s_yLoc = low > low ? low : low
r_yLoc = high > high ? high : high
//-----------------------------------------------------------------------------
// ๅฝๆฐ
//-----------------------------------------------------------------------------
drawBox(condition, y1, y2, color,bgcolor) =>
var box drawBox = na
if condition and showSupRes // ไป
ๅจๆพ็คบๅผๅ
ณๆๅผๆถ็ปๅถ
box.set_right(drawBox, bar_index - bb)
drawBox.set_extend(extend.none)
drawBox := box.new(bar_index - bb, y1, bar_index, y2, color, bgcolor = bgcolor, border_style = input_outL, extend = input_extend)
updateBox(box) =>
if barstate.isconfirmed and showSupRes
box.set_right(box, bar_index + 5)
breakLabel(y, txt_col,lb_col, style, textform) =>
if showSupRes
label.new(bar_index, y, textform, textcolor = input_override ? input_textColor : txt_col, style = style, color = lb_col, size = input_labelSize)
retestCondition(breakout, condition) =>
ta.barssince(na(breakout)) > input_retSince and condition
repaint(c1, c2, c3) => rTon ? c1 : rThv ? c2 : rTcc ? c3 : na
//-----------------------------------------------------------------------------
// ็ปๅถไธๆดๆฐๅบ้ด
//-----------------------------------------------------------------------------
= drawBox(ta.change(rs_pl), s_yLoc, rs_pl, input_plColor1,input_plColor2)
= drawBox(ta.change(rs_ph), rs_ph, r_yLoc, input_phColor1,input_phColor2)
sTop = box.get_top(sBox), rTop = box.get_top(rBox)
sBot = box.get_bottom(sBox), rBot = box.get_bottom(rBox)
if showSupRes
updateBox(sBox), updateBox(rBox)
//-----------------------------------------------------------------------------
// ็ช็ ดไบไปถ - ๅ ๅ
ฅ้กถ้จๅๅบ้จ่ง้ฟไปฅๅRSI็กฎ่ฎค
//-----------------------------------------------------------------------------
var bool sBreak = na
var bool rBreak = na
cu = repaint(ta.crossunder(close, box.get_bottom(sBox)), ta.crossunder(low, box.get_bottom(sBox)), ta.crossunder(close, box.get_bottom(sBox)) and barstate.isconfirmed)
co = repaint(ta.crossover(close, box.get_top(rBox)), ta.crossover(high, box.get_top(rBox)), ta.crossover(close, box.get_top(rBox)) and barstate.isconfirmed)
switch
cu and na(sBreak) and showSupRes and (not showADXFilter or adxStrong) and (not showBottomAvoidance or not isBottom) and (not showRSI or rsiSupportssell) =>
sBreak := true
if input_breakout
breakLabel(sBot, st_break_lb_co1,st_break_lb_co2, label.style_label_upper_right, breakText)
co and na(rBreak) and showSupRes and (not showADXFilter or adxStrong) and (not showTopAvoidance or not isTop) and (not showRSI or rsiSupportsBuy) =>
rBreak := true
if input_breakout
breakLabel(rTop, lg_break_lb_co1,lg_break_lb_co2, label.style_label_lower_right, breakText)
if ta.change(rs_pl) and showSupRes
if na(sBreak)
box.delete(sBox )
sBreak := na
if ta.change(rs_ph) and showSupRes
if na(rBreak)
box.delete(rBox )
rBreak := na
//-----------------------------------------------------------------------------
// ๅ่ธฉไบไปถ
//-----------------------------------------------------------------------------
s1 = retestCondition(sBreak, high >= sTop and close <= sBot)
s2 = retestCondition(sBreak, high >= sTop and close >= sBot and close <= sTop)
s3 = retestCondition(sBreak, high >= sBot and high <= sTop)
s4 = retestCondition(sBreak, high >= sBot and high <= sTop and close < sBot)
r1 = retestCondition(rBreak, low <= rBot and close >= rTop)
r2 = retestCondition(rBreak, low <= rBot and close <= rTop and close >= rBot)
r3 = retestCondition(rBreak, low <= rTop and low >= rBot)
r4 = retestCondition(rBreak, low <= rTop and low >= rBot and close > rTop)
retestEvent(c1, c2, c3, c4, y1, y2, txt_col,lb_col, style, pType) =>
if input_retest and showSupRes
var bool retOccurred = na
retActive = c1 or c2 or c3 or c4
retEvent = retActive and not retActive
retValue = ta.valuewhen(retEvent, y1, 0)
if pType == 'ph' ? y2 < ta.valuewhen(retEvent, y2, 0) : y2 > ta.valuewhen(retEvent, y2, 0)
retEvent := retActive
retValue := ta.valuewhen(retEvent, y1, 0)
retSince = ta.barssince(retEvent)
var retLabel = array.new()
if retEvent
retOccurred := na
array.push(retLabel, label.new(bar_index - retSince, y2 , text = input_labelType == '็ฎๆด' ? 'ๆฝๅ' : 'ๆฝๅจๅ่ธฉ', color = lb_col, style = style, textcolor = input_override ? input_textColor : txt_col, size = input_labelSize))
if array.size(retLabel) == 2
label.delete(array.first(retLabel))
array.shift(retLabel)
retConditions = pType == 'ph' ? repaint(close >= retValue, high >= retValue, close >= retValue and barstate.isconfirmed) : repaint(close <= retValue, low <= retValue, close <= retValue and barstate.isconfirmed)
retValid = ta.barssince(retEvent) > 0 and ta.barssince(retEvent) <= input_retValid and retConditions and not retOccurred and (not showADXFilter or adxStrong) and (not showRSI or (pType == 'ph' ? rsiSupportsBuy : rsiSupportssell))
if retValid
label.new(bar_index - retSince, y2 , text = input_labelType == '็ฎๆด' ? 'ๅ' : 'ๅ่ธฉ', color = lb_col, style = style, textcolor = input_override ? input_textColor : txt_col, size = input_labelSize)
retOccurred := true
if retValid or ta.barssince(retEvent) > input_retValid
label.delete(array.first(retLabel))
if pType == 'ph' and ta.change(rs_ph) and retOccurred
box.set_right(rBox , bar_index - retSince)
retOccurred := na
if pType == 'pl' and ta.change(rs_pl) and retOccurred
box.set_right(sBox , bar_index - retSince)
retOccurred := na
else
= retestEvent(r1, r2, r3, r4, high, low, lg_retest_lb_co1,lg_retest_lb_co2, label.style_label_upper_left, 'ph')
= retestEvent(s1, s2, s3, s4, low, high, st_retest_lb_co1,st_retest_lb_co2, label.style_label_lower_left, 'pl')
//-----------------------------------------------------------------------------
// ่ญฆๆฅ
//-----------------------------------------------------------------------------
// ไนฐๅไฟกๅท่ญฆๆฅๆกไปถ
buySignal = showTrendLines and trendLineBuySignal
sellSignal = showTrendLines and trendLineSellSignal
// ๆทปๅ ไนฐๅไฟกๅท็่ญฆๆฅๆกไปถ
alertcondition(buySignal, title='ไนฐๅ
ฅไฟกๅท', message='่ๅด่ฟๆปคๅจไนฐๅ
ฅไฟกๅท๏ผไธ่ฝจ็ช็ ด')
alertcondition(sellSignal, title='ๅๅบไฟกๅท', message='่ๅด่ฟๆปคๅจๅๅบไฟกๅท๏ผไธ่ฝจ็ช็ ด')
alertcondition((showSupRes and ta.change(rs_pl)), 'ๆฐๆฏๆไฝ')
alertcondition((showSupRes and ta.change(rs_ph)), 'ๆฐ้ปๅไฝ')
alertcondition((showSupRes and ta.barssince(na(sBreak)) == 1), 'ๆฏๆไฝ็ช็ ด')
alertcondition((showSupRes and ta.barssince(na(rBreak)) == 1), '้ปๅไฝ็ช็ ด')
alertcondition((showSupRes and sRetValid), 'ๆฏๆไฝๅ่ธฉ')
alertcondition((showSupRes and sRetEvent), 'ๆฝๅจๆฏๆๅ่ธฉ')
alertcondition((showSupRes and rRetValid), '้ปๅไฝๅ่ธฉ')
alertcondition((showSupRes and rRetEvent), 'ๆฝๅจ้ปๅๅ่ธฉ')
AllAlerts(condition, message) =>
if condition and showSupRes
alert(message)
AllAlerts(ta.change(rs_pl), 'ๆฐๆฏๆไฝ')
AllAlerts(ta.change(rs_ph), 'ๆฐ้ปๅไฝ')
AllAlerts(ta.barssince(na(sBreak)) == 1, 'ๆฏๆไฝ็ช็ ด')
AllAlerts(ta.barssince(na(rBreak)) == 1, '้ปๅไฝ็ช็ ด')
AllAlerts(sRetValid, 'ๆฏๆไฝๅ่ธฉ')
AllAlerts(sRetEvent, 'ๆฝๅจๆฏๆๅ่ธฉ')
AllAlerts(rRetValid, '้ปๅไฝๅ่ธฉ')
AllAlerts(rRetEvent, 'ๆฝๅจ้ปๅๅ่ธฉ')
AllAlerts(buySignal, 'ไนฐๅ
ฅไฟกๅท๏ผไธ่ฝจ็ช็ ด')
AllAlerts(sellSignal, 'ๅๅบไฟกๅท๏ผไธ่ฝจ็ช็ ด')
// === ๅคๅจๆ็งปๅจๅนณๅ็บฟ ้จๅ ===
// === ๅ
ฌๅ
ฑๅฝๆฐ ===
strRoundValue(num) =>
strv = ''
if num >= 100000
strv := str.tostring(num/1000, '#ๅ')
else if (num < 100000) and (num >= 100)
strv := str.tostring(num, '#')
else if (num < 100) and (num >= 1)
strv := str.tostring(num, '#.##')
else if (num < 1) and (num >= 0.01)
strv := str.tostring(num, '#.####')
else if (num < 0.01) and (num >= 0.0001)
strv := str.tostring(num, '#.######')
else if (num < 0.0001) and (num >= 0.000001)
strv := str.tostring(num, '#.########')
(strv)
defaultFunction(func, src, len, alma_offst, alma_sigma) =>
has_len = false
ma = ta.swma(close)
if func == '่ช้ๅบ็งปๅจๅนณๅ'
ma := ta.alma(src, len, alma_offst, alma_sigma)
has_len := true
else if func == 'ๆๆฐ็งปๅจๅนณๅ'
ma := ta.ema(src, len)
has_len := true
else if func == 'ไฟฎๆญฃ็งปๅจๅนณๅ'
ma := ta.rma(src, len)
has_len := true
else if func == '็ฎๅ็งปๅจๅนณๅ'
ma := ta.sma(src, len)
has_len := true
else if func == 'ๅฏน็งฐๅ ๆ็งปๅจๅนณๅ'
ma := ta.swma(src)
has_len := false
else if func == 'ๆไบค้ๅ ๆๅนณๅไปท'
ma := ta.vwap(src)
has_len := false
else if func == 'ๆไบค้ๅ ๆ็งปๅจๅนณๅ'
ma := ta.vwma(src, len)
has_len := true
else if func == 'ๅ ๆ็งปๅจๅนณๅ'
ma := ta.wma(src, len)
has_len := true
def_fn = input.string(title='้ป่ฎค็งปๅจๅนณๅ็บฟ', defval='ๆๆฐ็งปๅจๅนณๅ', options= , group="6. PMA ่ฎพ็ฝฎ")
ma1_on = input.bool(inline='ๅ็บฟ1', title='ๅฏ็จ็งปๅจๅนณๅ็บฟ1', defval=false, group="6. PMA ่ฎพ็ฝฎ")
ma2_on = input.bool(inline='ๅ็บฟ2', title='ๅฏ็จ็งปๅจๅนณๅ็บฟ2', defval=true, group="6. PMA ่ฎพ็ฝฎ")
ma3_on = input.bool(inline='ๅ็บฟ3', title='ๅฏ็จ็งปๅจๅนณๅ็บฟ3', defval=true, group="6. PMA ่ฎพ็ฝฎ")
ma4_on = input.bool(inline='ๅ็บฟ4', title='ๅฏ็จ็งปๅจๅนณๅ็บฟ4', defval=true, group="6. PMA ่ฎพ็ฝฎ")
ma5_on = input.bool(inline='ๅ็บฟ5', title='ๅฏ็จ็งปๅจๅนณๅ็บฟ5', defval=true, group="6. PMA ่ฎพ็ฝฎ")
ma6_on = input.bool(inline='ๅ็บฟ6', title='ๅฏ็จ็งปๅจๅนณๅ็บฟ6', defval=true, group="6. PMA ่ฎพ็ฝฎ")
ma7_on = input.bool(inline='ๅ็บฟ7', title='ๅฏ็จ็งปๅจๅนณๅ็บฟ7', defval=true, group="6. PMA ่ฎพ็ฝฎ")
ma1_fn = input.string(inline='ๅ็บฟ1', title='', defval='้ป่ฎค', options= , group="6. PMA ่ฎพ็ฝฎ")
ma2_fn = input.string(inline='ๅ็บฟ2', title='', defval='้ป่ฎค', options= , group="6. PMA ่ฎพ็ฝฎ")
ma3_fn = input.string(inline='ๅ็บฟ3', title='', defval='้ป่ฎค', options= , group="6. PMA ่ฎพ็ฝฎ")
ma4_fn = input.string(inline='ๅ็บฟ4', title='', defval='้ป่ฎค', options= , group="6. PMA ่ฎพ็ฝฎ")
ma5_fn = input.string(inline='ๅ็บฟ5', title='', defval='้ป่ฎค', options= , group="6. PMA ่ฎพ็ฝฎ")
ma6_fn = input.string(inline='ๅ็บฟ6', title='', defval='้ป่ฎค', options= , group="6. PMA ่ฎพ็ฝฎ")
ma7_fn = input.string(inline='ๅ็บฟ7', title='', defval='้ป่ฎค', options= , group="6. PMA ่ฎพ็ฝฎ")
ma1_len = input.int(inline='ๅ็บฟ1', title='', defval=12, minval=1, group="6. PMA ่ฎพ็ฝฎ")
ma2_len = input.int(inline='ๅ็บฟ2', title='', defval=144, minval=1, group="6. PMA ่ฎพ็ฝฎ")
ma3_len = input.int(inline='ๅ็บฟ3', title='', defval=169, minval=1, group="6. PMA ่ฎพ็ฝฎ")
ma4_len = input.int(inline='ๅ็บฟ4', title='', defval=288, minval=1, group="6. PMA ่ฎพ็ฝฎ")
ma5_len = input.int(inline='ๅ็บฟ5', title='', defval=338, minval=1, group="6. PMA ่ฎพ็ฝฎ")
ma6_len = input.int(inline='ๅ็บฟ6', title='', defval=576, minval=1, group="6. PMA ่ฎพ็ฝฎ")
ma7_len = input.int(inline='ๅ็บฟ7', title='', defval=676, minval=1, group="6. PMA ่ฎพ็ฝฎ")
alma1_offst = input.float(group='ๅ็บฟ1ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ11', title='่ช้ๅบๅ็งป', defval=0.85, minval=-1, maxval=1, step=0.01)
alma1_sigma = input.float(group='ๅ็บฟ1ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ11', title=', ่ฅฟๆ ผ็', defval=6, minval=0, maxval=100, step=0.01)
ma1_src = input.source(group='ๅ็บฟ1ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ12', title='ๆฐๆฎๆบ', defval=close)
ma1_plt_offst = input.int(group='ๅ็บฟ1ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ12', title=', ็ปๅพๅ็งป', defval=0, minval=-500, maxval=500)
alma2_offst = input.float(group='ๅ็บฟ2ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ21', title='่ช้ๅบๅ็งป', defval=0.85, minval=-1, maxval=1, step=0.01)
alma2_sigma = input.float(group='ๅ็บฟ2ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ21', title='่ฅฟๆ ผ็', defval=6, minval=0, maxval=100, step=0.01)
ma2_src = input.source(group='ๅ็บฟ2ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ22', title='ๆฐๆฎๆบ', defval=close)
ma2_plt_offst = input.int(group='ๅ็บฟ2ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ22', title='็ปๅพๅ็งป', defval=0, minval=-500, maxval=500)
alma3_offst = input.float(group='ๅ็บฟ3ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ31', title='่ช้ๅบๅ็งป', defval=0.85, minval=-1, maxval=1, step=0.01)
alma3_sigma = input.float(group='ๅ็บฟ3ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ31', title='่ฅฟๆ ผ็', defval=6, minval=0, maxval=100, step=0.01)
ma3_src = input.source(group='ๅ็บฟ3ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ32', title='ๆฐๆฎๆบ', defval=close)
ma3_plt_offst = input.int(group='ๅ็บฟ3ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ32', title='็ปๅพๅ็งป', defval=0, minval=-500, maxval=500)
alma4_offst = input.float(group='ๅ็บฟ4ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ41', title='่ช้ๅบๅ็งป', defval=0.85, minval=-1, maxval=1, step=0.01)
alma4_sigma = input.float(group='ๅ็บฟ4ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ41', title='่ฅฟๆ ผ็', defval=6, minval=0, maxval=100, step=0.01)
ma4_src = input.source(group='ๅ็บฟ4ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ42', title='ๆฐๆฎๆบ', defval=close)
ma4_plt_offst = input.int(group='ๅ็บฟ4ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ42', title='็ปๅพๅ็งป', defval=0, minval=-500, maxval=500)
alma5_offst = input.float(group='ๅ็บฟ5ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ51', title='่ช้ๅบๅ็งป', defval=0.85, minval=-1, maxval=1, step=0.01)
alma5_sigma = input.float(group='ๅ็บฟ5ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ51', title='่ฅฟๆ ผ็', defval=6, minval=0, maxval=100, step=0.01)
ma5_src = input.source(group='ๅ็บฟ5ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ52', title='ๆฐๆฎๆบ', defval=close)
ma5_plt_offst = input.int(group='ๅ็บฟ5ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ52', title='็ปๅพๅ็งป', defval=0, minval=-500, maxval=500)
alma6_offst = input.float(group='ๅ็บฟ6ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ61', title='่ช้ๅบๅ็งป', defval=0.85, minval=-1, maxval=1, step=0.01)
alma6_sigma = input.float(group='ๅ็บฟ6ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ61', title='่ฅฟๆ ผ็', defval=6, minval=0, maxval=100, step=0.01)
ma6_src = input.source(group='ๅ็บฟ6ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ62', title='ๆฐๆฎๆบ', defval=close)
ma6_plt_offst = input.int(group='ๅ็บฟ6ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ62', title='็ปๅพๅ็งป', defval=0, minval=-500, maxval=500)
alma7_offst = input.float(group='ๅ็บฟ7ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ71', title='่ช้ๅบๅ็งป', defval=0.85, minval=-1, maxval=1, step=0.01)
alma7_sigma = input.float(group='ๅ็บฟ7ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ71', title='่ฅฟๆ ผ็', defval=6, minval=0, maxval=100, step=0.01)
ma7_src = input.source(group='ๅ็บฟ7ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ72', title='ๆฐๆฎๆบ', defval=close)
ma7_plt_offst = input.int(group='ๅ็บฟ7ๅ
ถไป่ฎพ็ฝฎ', inline='ๅ็บฟ72', title='็ปๅพๅ็งป', defval=0, minval=-500, maxval=500)
fill_12_on = input.bool(title='ๅฏ็จๅ็บฟ1-2ๅกซๅ
', defval=false, group="6. PMA ่ฎพ็ฝฎ")
fill_23_on = input.bool(title='ๅฏ็จๅ็บฟ2-3ๅกซๅ
', defval=true, group="6. PMA ่ฎพ็ฝฎ")
fill_34_on = input.bool(title='ๅฏ็จๅ็บฟ3-4ๅกซๅ
', defval=false, group="6. PMA ่ฎพ็ฝฎ")
fill_45_on = input.bool(title='ๅฏ็จๅ็บฟ4-5ๅกซๅ
', defval=true, group="6. PMA ่ฎพ็ฝฎ")
fill_56_on = input.bool(title='ๅฏ็จๅ็บฟ5-6ๅกซๅ
', defval=false, group="6. PMA ่ฎพ็ฝฎ")
fill_67_on = input.bool(title='ๅฏ็จๅ็บฟ6-7ๅกซๅ
', defval=true, group="6. PMA ่ฎพ็ฝฎ")
// === ่ฎก็ฎ็งปๅจๅนณๅ็บฟ ===
= defaultFunction(def_fn, ma1_src, ma1_len, alma1_offst, alma1_sigma)
= defaultFunction(def_fn, ma2_src, ma2_len, alma2_offst, alma2_sigma)
= defaultFunction(def_fn, ma3_src, ma3_len, alma3_offst, alma3_sigma)
= defaultFunction(def_fn, ma4_src, ma4_len, alma4_offst, alma4_sigma)
= defaultFunction(def_fn, ma5_src, ma5_len, alma5_offst, alma5_sigma)
= defaultFunction(def_fn, ma6_src, ma6_len, alma6_offst, alma6_sigma)
= defaultFunction(def_fn, ma7_src, ma7_len, alma7_offst, alma7_sigma)
// === ๅ็บฟ็ฑปๅๅๆข ===
if ma1_fn != '้ป่ฎค'
if ma1_fn == '่ช้ๅบ็งปๅจๅนณๅ'
ma1 := ta.alma(ma1_src, ma1_len, alma1_offst, alma1_sigma)
ma1_has_len := true
else if ma1_fn == 'ๆๆฐ็งปๅจๅนณๅ'
ma1 := ta.ema(ma1_src, ma1_len)
ma1_has_len := true
else if ma1_fn == 'ไฟฎๆญฃ็งปๅจๅนณๅ'
ma1 := ta.rma(ma1_src, ma1_len)
ma1_has_len := true
else if ma1_fn == '็ฎๅ็งปๅจๅนณๅ'
ma1 := ta.sma(ma1_src, ma1_len)
ma1_has_len := true
else if ma1_fn == 'ๅฏน็งฐๅ ๆ็งปๅจๅนณๅ'
ma1 := ta.swma(ma1_src)
ma1_has_len := false
else if ma1_fn == 'ๆไบค้ๅ ๆๅนณๅไปท'
ma1 := ta.vwap(ma1_src)
ma1_has_len := false
else if ma1_fn == 'ๆไบค้ๅ ๆ็งปๅจๅนณๅ'
ma1 := ta.vwma(ma1_src, ma1_len)
ma1_has_len := true
else if ma1_fn == 'ๅ ๆ็งปๅจๅนณๅ'
ma1 := ta.wma(ma1_src, ma1_len)
ma1_has_len := true
if ma2_fn != '้ป่ฎค'
if ma2_fn == '่ช้ๅบ็งปๅจๅนณๅ'
ma2 := ta.alma(ma2_src, ma2_len, alma2_offst, alma2_sigma)
ma2_has_len := true
else if ma2_fn == 'ๆๆฐ็งปๅจๅนณๅ'
ma2 := ta.ema(ma2_src, ma2_len)
ma2_has_len := true
else if ma2_fn == 'ไฟฎๆญฃ็งปๅจๅนณๅ'
ma2 := ta.rma(ma2_src, ma2_len)
ma2_has_len := true
else if ma2_fn == '็ฎๅ็งปๅจๅนณๅ'
ma2 := ta.sma(ma2_src, ma2_len)
ma2_has_len := true
else if ma2_fn == 'ๅฏน็งฐๅ ๆ็งปๅจๅนณๅ'
ma2 := ta.swma(ma2_src)
ma2_has_len := false
else if ma2_fn == 'ๆไบค้ๅ ๆๅนณๅไปท'
ma2 := ta.vwap(ma2_src)
ma2_has_len := false
else if ma2_fn == 'ๆไบค้ๅ ๆ็งปๅจๅนณๅ'
ma2 := ta.vwma(ma2_src, ma2_len)
ma2_has_len := true
else if ma2_fn == 'ๅ ๆ็งปๅจๅนณๅ'
ma2 := ta.wma(ma2_src, ma2_len)
ma2_has_len := true
if ma3_fn != '้ป่ฎค'
if ma3_fn == '่ช้ๅบ็งปๅจๅนณๅ'
ma3 := ta.alma(ma3_src, ma3_len, alma3_offst, alma3_sigma)
ma3_has_len := true
else if ma3_fn == 'ๆๆฐ็งปๅจๅนณๅ'
ma3 := ta.ema(ma3_src, ma3_len)
ma3_has_len := true
else if ma3_fn == 'ไฟฎๆญฃ็งปๅจๅนณๅ'
ma3 := ta.rma(ma3_src, ma3_len)
ma3_has_len := true
else if ma3_fn == '็ฎๅ็งปๅจๅนณๅ'
ma3 := ta.sma(ma3_src, ma3_len)
ma3_has_len := true
else if ma3_fn == 'ๅฏน็งฐๅ ๆ็งปๅจๅนณๅ'
ma3 := ta.swma(ma3_src)
ma3_has_len := false
else if ma3_fn == 'ๆไบค้ๅ ๆๅนณๅไปท'
ma3 := ta.vwap(ma3_src)
ma3_has_len := false
else if ma3_fn == 'ๆไบค้ๅ ๆ็งปๅจๅนณๅ'
ma3 := ta.vwma(ma3_src, ma3_len)
ma3_has_len := true
else if ma3_fn == 'ๅ ๆ็งปๅจๅนณๅ'
ma3 := ta.wma(ma3_src, ma3_len)
ma3_has_len := true
if ma4_fn != '้ป่ฎค'
if ma4_fn == '่ช้ๅบ็งปๅจๅนณๅ'
ma4 := ta.alma(ma4_src, ma4_len, alma4_offst, alma4_sigma)
ma4_has_len := true
else if ma4_fn == 'ๆๆฐ็งปๅจๅนณๅ'
ma4 := ta.ema(ma4_src, ma4_len)
ma4_has_len := true
else if ma4_fn == 'ไฟฎๆญฃ็งปๅจๅนณๅ'
ma4 := ta.rma(ma4_src, ma4_len)
ma4_has_len := true
else if ma4_fn == '็ฎๅ็งปๅจๅนณๅ'
ma4 := ta.sma(ma4_src, ma4_len)
ma4_has_len := true
else if ma4_fn == 'ๅฏน็งฐๅ ๆ็งปๅจๅนณๅ'
ma4 := ta.swma(ma4_src)
ma4_has_len := false
else if ma4_fn == 'ๆไบค้ๅ ๆๅนณๅไปท'
ma4 := ta.vwap(ma4_src)
ma4_has_len := false
else if ma4_fn == 'ๆไบค้ๅ ๆ็งปๅจๅนณๅ'
ma4 := ta.vwma(ma4_src, ma4_len)
ma4_has_len := true
else if ma4_fn == 'ๅ ๆ็งปๅจๅนณๅ'
ma4 := ta.wma(ma4_src, ma4_len)
ma4_has_len := true
if ma5_fn != '้ป่ฎค'
if ma5_fn == '่ช้ๅบ็งปๅจๅนณๅ'
ma5 := ta.alma(ma5_src, ma5_len, alma5_offst, alma5_sigma)
ma5_has_len := true
else if ma5_fn == 'ๆๆฐ็งปๅจๅนณๅ'
ma5 := ta.ema(ma5_src, ma5_len)
ma5_has_len := true
else if ma5_fn == 'ไฟฎๆญฃ็งปๅจๅนณๅ'
ma5 := ta.rma(ma5_src, ma5_len)
ma5_has_len := true
else if ma5_fn == '็ฎๅ็งปๅจๅนณๅ'
ma5 := ta.sma(ma5_src, ma5_len)
ma5_has_len := true
else if ma5_fn == 'ๅฏน็งฐๅ ๆ็งปๅจๅนณๅ'
ma5 := ta.swma(ma5_src)
ma5_has_len := false
else if ma5_fn == 'ๆไบค้ๅ ๆๅนณๅไปท'
ma5 := ta.vwap(ma5_src)
ma5_has_len := false
else if ma5_fn == 'ๆไบค้ๅ ๆ็งปๅจๅนณๅ'
ma5 := ta.vwma(ma5_src, ma5_len)
ma5_has_len := true
else if ma5_fn == 'ๅ ๆ็งปๅจๅนณๅ'
ma5 := ta.wma(ma5_src, ma5_len)
ma5_has_len := true
if ma6_fn != '้ป่ฎค'
if ma6_fn == '่ช้ๅบ็งปๅจๅนณๅ'
ma6 := ta.alma(ma6_src, ma6_len, alma6_offst, alma6_sigma)
ma6_has_len := true
else if ma6_fn == 'ๆๆฐ็งปๅจๅนณๅ'
ma6 := ta.ema(ma6_src, ma6_len)
ma6_has_len := true
else if ma6_fn == 'ไฟฎๆญฃ็งปๅจๅนณๅ'
ma6 := ta.rma(ma6_src, ma6_len)
ma6_has_len := true
else if ma6_fn == '็ฎๅ็งปๅจๅนณๅ'
ma6 := ta.sma(ma6_src, ma6_len)
ma6_has_len := true
else if ma6_fn == 'ๅฏน็งฐๅ ๆ็งปๅจๅนณๅ'
ma6 := ta.swma(ma6_src)
ma6_has_len := false
else if ma6_fn == 'ๆไบค้ๅ ๆๅนณๅไปท'
ma6 := ta.vwap(ma6_src)
ma6_has_len := false
else if ma6_fn == 'ๆไบค้ๅ ๆ็งปๅจๅนณๅ'
ma6 := ta.vwma(ma6_src, ma6_len)
ma6_has_len := true
else if ma6_fn == 'ๅ ๆ็งปๅจๅนณๅ'
ma6 := ta.wma(ma6_src, ma6_len)
ma6_has_len := true
if ma7_fn != '้ป่ฎค'
if ma7_fn == '่ช้ๅบ็งปๅจๅนณๅ'
ma7 := ta.alma(ma7_src, ma7_len, alma7_offst, alma7_sigma)
ma7_has_len := true
else if ma7_fn == 'ๆๆฐ็งปๅจๅนณๅ'
ma7 := ta.ema(ma7_src, ma7_len)
ma7_has_len := true
else if ma7_fn == 'ไฟฎๆญฃ็งปๅจๅนณๅ'
ma7 := ta.rma(ma7_src, ma7_len)
ma7_has_len := true
else if ma7_fn == '็ฎๅ็งปๅจๅนณๅ'
ma7 := ta.sma(ma7_src, ma7_len)
ma7_has_len := true
else if ma7_fn == 'ๅฏน็งฐๅ ๆ็งปๅจๅนณๅ'
ma7 := ta.swma(ma7_src)
ma7_has_len := false
else if ma7_fn == 'ๆไบค้ๅ ๆๅนณๅไปท'
ma7 := ta.vwap(ma7_src)
ma7_has_len := false
else if ma7_fn == 'ๆไบค้ๅ ๆ็งปๅจๅนณๅ'
ma7 := ta.vwma(ma7_src, ma7_len)
ma7_has_len := true
else if ma7_fn == 'ๅ ๆ็งปๅจๅนณๅ'
ma7 := ta.wma(ma7_src, ma7_len)
ma7_has_len := true
// === ๅ็บฟ้ข่ฒ ===
ma1_clr = color.new(color.fuchsia, 0)
ma2_clr = color.new(color.aqua, 0)
ma3_clr = color.new(color.yellow, 0)
ma4_clr = color.new(color.blue, 0)
ma5_clr = color.new(color.orange, 0)
ma6_clr = color.new(color.green, 0)
ma7_clr = color.new(color.red, 0)
// === ๅ็บฟๅ
จๅฑ็ปๅพ ===
p1 = plot(series=showPMA and ma1_on ? ma1 : na, title="ๅ็บฟ1", color=ma1_clr, trackprice=false, offset=ma1_plt_offst, linewidth=2)
p2 = plot(series=showPMA and ma2_on ? ma2 : na, title="ๅ็บฟ2", color=ma2_clr, trackprice=false, offset=ma2_plt_offst, linewidth=2)
p3 = plot(series=showPMA and ma3_on ? ma3 : na, title="ๅ็บฟ3", color=ma3_clr, trackprice=false, offset=ma3_plt_offst, linewidth=2)
p4 = plot(series=showPMA and ma4_on ? ma4 : na, title="ๅ็บฟ4", color=ma4_clr, trackprice=false, offset=ma4_plt_offst, linewidth=2)
p5 = plot(series=showPMA and ma5_on ? ma5 : na, title="ๅ็บฟ5", color=ma5_clr, trackprice=false, offset=ma5_plt_offst, linewidth=2)
p6 = plot(series=showPMA and ma6_on ? ma6 : na, title="ๅ็บฟ6", color=ma6_clr, trackprice=false, offset=ma6_plt_offst, linewidth=2)
p7 = plot(series=showPMA and ma7_on ? ma7 : na, title="ๅ็บฟ7", color=ma7_clr, trackprice=false, offset=ma7_plt_offst, linewidth=2)
// === ๅคๅจๆ็งปๅจๅนณๅ็บฟ ๅกซๅ
ๆธฒๆ ===
fill(p1, p2, color=showPMA and ma1_on and ma2_on and fill_12_on ? color.new(color.purple, 70) : na, title="ๅ็บฟ1-2ๅกซๅ
")
fill(p2, p3, color=showPMA and ma2_on and ma3_on and fill_23_on ? color.new(color.blue, 70) : na, title="ๅ็บฟ2-3ๅกซๅ
")
fill(p3, p4, color=showPMA and ma3_on and ma4_on and fill_34_on ? color.new(color.teal, 70) : na, title="ๅ็บฟ3-4ๅกซๅ
")
fill(p4, p5, color=showPMA and ma4_on and ma5_on and fill_45_on ? color.new(color.green, 70) : na, title="ๅ็บฟ4-5ๅกซๅ
")
fill(p5, p6, color=showPMA and ma5_on and ma6_on and fill_56_on ? color.new(color.yellow, 70) : na, title="ๅ็บฟ5-6ๅกซๅ
")
fill(p6, p7, color=showPMA and ma6_on and ma7_on and fill_67_on ? color.new(color.orange, 70) : na, title="ๅ็บฟ6-7ๅกซๅ
")
// === ไบคๆไฟกๆฏ่กจๆ ผ ้จๅ ===
// ่กจๆ ผๅๆฐ่ฎพ็ฝฎ - ไฟฎๆน้ป่ฎคๅคงๅฐไธบไธญ็ญ
tablePos = input.string("ๅณไธ่ง", title="่กจๆ ผไฝ็ฝฎ", options= , group="7. ไบคๆไฟกๆฏ่กจๆ ผ ่ฎพ็ฝฎ")
tableSize = input.string("ไธญ็ญ", title="่กจๆ ผๅคงๅฐ", options= , group="7. ไบคๆไฟกๆฏ่กจๆ ผ ่ฎพ็ฝฎ")
showTargets = input.bool(true, title="ๆพ็คบๆญข็็ฎๆ ", group="7. ไบคๆไฟกๆฏ่กจๆ ผ ่ฎพ็ฝฎ")
showRatio = input.bool(true, title="ๆพ็คบ็ไบๆฏ", group="7. ไบคๆไฟกๆฏ่กจๆ ผ ่ฎพ็ฝฎ")
// ่พ
ๅฉๅฝๆฐ
getTablePosition() =>
switch tablePos
"ๅณไธ่ง" => position.top_right
"ๅณไธ่ง" => position.bottom_right
"ๅทฆไธ่ง" => position.top_left
"ๅทฆไธ่ง" => position.bottom_left
getTableSize() =>
switch tableSize
"ๅฐ" => size.small
"ไธญ็ญ" => size.normal
"ๅคง" => size.large
formatPrice(price) =>
if na(price)
"N/A"
else
str.tostring(price, "#.####")
calcStopLossPercentage(entryPrice, stopLoss, entryType) =>
if na(entryPrice) or na(stopLoss) or na(entryType)
""
else
pct = 0.0
if entryType == "ๅคๅ"
pct := (stopLoss - entryPrice) / entryPrice * 100
else if entryType == "็ฉบๅ"
pct := (entryPrice - stopLoss) / entryPrice * 100
" (" + str.tostring(pct, "#.##") + "%)"
calcTakeProfitPercentage(entryPrice, takeProfit, entryType) =>
if na(entryPrice) or na(takeProfit) or na(entryType)
""
else
pct = 0.0
if entryType == "ๅคๅ"
pct := (takeProfit - entryPrice) / entryPrice * 100
else if entryType == "็ฉบๅ"
pct := (entryPrice - takeProfit) / entryPrice * 100
" (+" + str.tostring(pct, "#.##") + "%)"
calcUnrealizedPnL(entryPrice, currentPrice, entryType) =>
if na(entryPrice) or na(currentPrice) or na(entryType)
""
else
priceDiff = currentPrice - entryPrice
pct = (currentPrice - entryPrice) / entryPrice * 100
if entryType == "ๅคๅ"
if pct > 0
" (" + formatPrice(priceDiff) + ", +" + str.tostring(pct, "#.##") + "%)"
else
" (" + formatPrice(priceDiff) + ", " + str.tostring(pct, "#.##") + "%)"
else if entryType == "็ฉบๅ"
// ๅฏนไบ็ฉบๅ๏ผไปทๅทฎ็ฌฆๅท็ธๅ
if pct < 0
" (" + formatPrice(-priceDiff) + ", +" + str.tostring(-pct, "#.##") + "%)"
else
" (" + formatPrice(-priceDiff) + ", " + str.tostring(-pct, "#.##") + "%)"
else
""
// RSI็ถๆ้ข่ฒๅฝๆฐ
getRSIStatusColor() =>
switch rsiStatus
"ๅจ้ๅๅ" => // ็ปฟ่ฒ
"ๅจ้ๅ่ฝ" => // ็บข่ฒ
"ๅจ้ไธญๆง" => // ้ป่ฒ
=> // ้ป่ฎค็ฐ่ฒ
// ๅคๆถ้ดๆกๆถ่ถๅฟ้ข่ฒๅฝๆฐ
getTrendColor(trendDirection) =>
switch trendDirection
"ๅคๅคดๅพๅ" => // ็ปฟ่ฒ
"็ฉบๅคดๅพๅ" => // ็บข่ฒ
"้่ก" => // ้ป่ฒ
=> // ้ป่ฎค็ฐ่ฒ
// === ่็ดซ็งๅนป้ฃๆ ผ่กจๆ ผ ===
// ๅๅปบ่็ดซ่ฒไธป้ข็่กจๆ ผ
var infoTable = table.new(getTablePosition(), columns=2, rows=26,
bgcolor=color.new(#0f0a1a, 5),
border_width=3,
border_color=color.new(#6633ff, 40),
frame_width=2,
frame_color=color.new(#9966ff, 30))
if showTable and barstate.islast
// ็กฎๅฎๆญข็ๆญขๆไฝ
var float stopLoss = na
var float takeProfit1 = na
var float takeProfit2 = na
if not na(entryType)
if entryType == "ๅคๅ"
stopLoss := na(sBot) ? entryPrice * 0.98 : sBot
takeProfit1 := na(rTop) ? entryPrice * 1.02 : rTop
takeProfit2 := entryPrice * 1.05
else if entryType == "็ฉบๅ"
stopLoss := na(rTop) ? entryPrice * 1.02 : rTop
takeProfit1 := na(sBot) ? entryPrice * 0.98 : sBot
takeProfit2 := entryPrice * 0.95
// ่ฎก็ฎ็ไบๆฏ
riskRewardRatio = na(entryPrice) or na(stopLoss) or na(takeProfit1) ? na :
math.abs(takeProfit1 - entryPrice) / math.abs(entryPrice - stopLoss)
riskRewardStr = na(riskRewardRatio) ? "N/A" : "1:" + str.tostring(riskRewardRatio, "#.##")
rowIndex = 0
// === ไฝ่
่็ณปไฟกๆฏ่ก - ๆ้กถ้จ๏ผๅคงๅญไฝ ===
table.cell(infoTable, 0, rowIndex, "ๅไฝ่็ณปไฝ่
", text_color=color.new(#ffcc99, 0),
text_size=size.normal, bgcolor=color.new(#1a1a0d, 0))
table.cell(infoTable, 1, rowIndex, "qq2390107445", text_color=color.new(#66ff99, 0),
text_size=size.normal, bgcolor=color.new(#0d2619, 0))
rowIndex += 1
// === ่กจๆ ผๆ ้ข่ก - ่็ดซไธป้ข ===
table.cell(infoTable, 0, rowIndex, "โก P6โๆบ่ฝ่ต้ๆฆๅฟตไบคๆ็ณป็ป", text_color=color.new(#ccccff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
table.cell(infoTable, 1, rowIndex, "ใ" + syminfo.ticker + "ใ", text_color=color.new(#9966ff, 0),
text_size=size.normal, bgcolor=color.new(#1a0d33, 0))
rowIndex += 1
// === ๅฝๅไปทๆ ผไธๆตฎ็ๆตฎไบ่ก - ่็ดซไธป้ข ===
unrealizedPnL = calcUnrealizedPnL(entryPrice, close, entryType)
// ๆตฎ็ๆตฎไบ้ข่ฒ้ป่พ
pnlColor = color.new(#ccccff, 0)
pnlBgColor = color.new(#0d0d1a, 0)
if not na(entryPrice)
if entryType == "ๅคๅ"
if close > entryPrice
pnlColor := color.new(#66ff99, 0)
pnlBgColor := color.new(#0d2619, 0)
else
pnlColor := color.new(#ff6699, 0)
pnlBgColor := color.new(#260d19, 0)
else if entryType == "็ฉบๅ"
if close < entryPrice
pnlColor := color.new(#66ff99, 0)
pnlBgColor := color.new(#0d2619, 0)
else
pnlColor := color.new(#ff6699, 0)
pnlBgColor := color.new(#260d19, 0)
table.cell(infoTable, 0, rowIndex, "ๅฝๅไปทๆ ผ", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(close) + unrealizedPnL,
text_color=pnlColor,
text_size=getTableSize(), bgcolor=pnlBgColor)
rowIndex += 1
// === ่ถๅฟ็ถๆไธ่ฟๅบไปทๆ ผ่ก - ่็ดซไธป้ข ===
trendStatus = na(entryType) ? "ๅพ
ๆบไธญ" : entryType == "ๅคๅ" ? "ๅคๅคดๆง่ก" : "็ฉบๅคดๆง่ก"
trendIcon = entryType == "ๅคๅ" ? " โฒ" : entryType == "็ฉบๅ" ? " โผ" : " โ"
trendBgColor = entryType == "ๅคๅ" ? color.new(#1a4d1a, 0) :
entryType == "็ฉบๅ" ? color.new(#4d1a1a, 0) :
color.new(#1a1a4d, 0)
trendTextColor = entryType == "ๅคๅ" ? color.new(#66ff99, 0) :
entryType == "็ฉบๅ" ? color.new(#ff6699, 0) :
color.new(#9999ff, 0)
table.cell(infoTable, 0, rowIndex, "ไบคๆ็ถๆ", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trendStatus + trendIcon, text_color=trendTextColor,
text_size=getTableSize(), bgcolor=trendBgColor)
rowIndex += 1
// === ่ฟๅบไปทๆ ผ่ก - ่็ดซไธป้ข ===
table.cell(infoTable, 0, rowIndex, "่ฟๅบไปทไฝ", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(entryPrice),
text_color=color.new(#ffcc99, 0),
text_size=getTableSize(), bgcolor=color.new(#1a1a0d, 0))
rowIndex += 1
// === ๅคๆถ้ดๆกๆถๅๆ - ็ฌ็ซ่กๆพ็คบ ===
if showMTF
// ๅคๆถ้ดๆกๆถๆ ้ข่ก
table.cell(infoTable, 0, rowIndex, "โโ ๅคๆถ้ดๆกๆถ่ถๅฟ โโ", text_color=color.new(#ccccff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
table.cell(infoTable, 1, rowIndex, "โโโโโโโโโโโโโโโโโโโโ", text_color=color.new(#6633ff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
rowIndex += 1
// 1ๅ้่ถๅฟ
if mtfEnable1m
= getTrendColor(trend1mDir)
trend1mIcon = trend1mDir == "ๅคๅคดๅพๅ" ? " โฒ" : trend1mDir == "็ฉบๅคดๅพๅ" ? " โผ" : " โ"
table.cell(infoTable, 0, rowIndex, "1ๅ้", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend1mDir + trend1mIcon, text_color=trend1mTextColor,
text_size=getTableSize(), bgcolor=trend1mBgColor)
rowIndex += 1
// 5ๅ้่ถๅฟ
if mtfEnable5m
= getTrendColor(trend5mDir)
trend5mIcon = trend5mDir == "ๅคๅคดๅพๅ" ? " โฒ" : trend5mDir == "็ฉบๅคดๅพๅ" ? " โผ" : " โ"
table.cell(infoTable, 0, rowIndex, "5ๅ้", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend5mDir + trend5mIcon, text_color=trend5mTextColor,
text_size=getTableSize(), bgcolor=trend5mBgColor)
rowIndex += 1
// 15ๅ้่ถๅฟ
if mtfEnable15m
= getTrendColor(trend15mDir)
trend15mIcon = trend15mDir == "ๅคๅคดๅพๅ" ? " โฒ" : trend15mDir == "็ฉบๅคดๅพๅ" ? " โผ" : " โ"
table.cell(infoTable, 0, rowIndex, "15ๅ้", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend15mDir + trend15mIcon, text_color=trend15mTextColor,
text_size=getTableSize(), bgcolor=trend15mBgColor)
rowIndex += 1
// 1ๅฐๆถ่ถๅฟ
if mtfEnable1h
= getTrendColor(trend1hDir)
trend1hIcon = trend1hDir == "ๅคๅคดๅพๅ" ? " โฒ" : trend1hDir == "็ฉบๅคดๅพๅ" ? " โผ" : " โ"
table.cell(infoTable, 0, rowIndex, "1ๅฐๆถ", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend1hDir + trend1hIcon, text_color=trend1hTextColor,
text_size=getTableSize(), bgcolor=trend1hBgColor)
rowIndex += 1
// 4ๅฐๆถ่ถๅฟ
if mtfEnable4h
= getTrendColor(trend4hDir)
trend4hIcon = trend4hDir == "ๅคๅคดๅพๅ" ? " โฒ" : trend4hDir == "็ฉบๅคดๅพๅ" ? " โผ" : " โ"
table.cell(infoTable, 0, rowIndex, "4ๅฐๆถ", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend4hDir + trend4hIcon, text_color=trend4hTextColor,
text_size=getTableSize(), bgcolor=trend4hBgColor)
rowIndex += 1
// === RSI ๅจ้็ถๆ่ก - ่็ดซไธป้ข ===
rsiTextColor = color.new(#ccccff, 0)
rsiBgColor = color.new(#0d0d1a, 0)
if rsiStatus == "ๅจ้ๅๅ"
rsiTextColor := color.new(#66ff99, 0)
rsiBgColor := color.new(#0d2619, 0)
else if rsiStatus == "ๅจ้ๅ่ฝ"
rsiTextColor := color.new(#ff6699, 0)
rsiBgColor := color.new(#260d19, 0)
else
rsiTextColor := color.new(#ffcc99, 0)
rsiBgColor := color.new(#1a1a0d, 0)
rsiIcon = rsiStatus == "ๅจ้ๅๅ" ? " โฒ" : rsiStatus == "ๅจ้ๅ่ฝ" ? " โผ" : " โ"
rsiDisplayText = rsiStatus + rsiIcon + " (" + str.tostring(rsiValue, "#.#") + ")"
table.cell(infoTable, 0, rowIndex, "RSIๅจ้", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, rsiDisplayText, text_color=rsiTextColor,
text_size=getTableSize(), bgcolor=rsiBgColor)
rowIndex += 1
// === ้ฃ้ฉ็ฎก็ๅๅฒ็บฟ ===
table.cell(infoTable, 0, rowIndex, "โโ ้ฃ้ฉ็ฎก็ โโ", text_color=color.new(#ccccff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
table.cell(infoTable, 1, rowIndex, "โโโโโโโโโโโโโโโโโโโโ", text_color=color.new(#6633ff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
rowIndex += 1
// === ๆญขๆ่ก - ่็ดซไธป้ข ===
slPct = calcStopLossPercentage(entryPrice, stopLoss, entryType)
table.cell(infoTable, 0, rowIndex, "ๆญขๆไปทไฝ", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(stopLoss) + slPct,
text_color=color.new(#ff6699, 0),
text_size=getTableSize(), bgcolor=color.new(#330d1a, 0))
rowIndex += 1
// ๆญข็็ฎๆ ่ก
if showTargets
// === ็ฎๆ ไฝ1 - ่็ดซไธป้ข ===
tp1Pct = calcTakeProfitPercentage(entryPrice, takeProfit1, entryType)
tp1Reached = na(takeProfit1) ? false :
(entryType == "ๅคๅ" ? high >= takeProfit1 : low <= takeProfit1)
tp1Icon = tp1Reached ? " โ" : ""
tp1Color = tp1Reached ? color.new(#66ff99, 0) : color.new(#99ccff, 0)
tp1BgColor = tp1Reached ? color.new(#0d2619, 0) : color.new(#0d1a26, 0)
table.cell(infoTable, 0, rowIndex, "ๆญข็็ฎๆ 1", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(takeProfit1) + tp1Pct + tp1Icon,
text_color=tp1Color,
text_size=getTableSize(), bgcolor=tp1BgColor)
rowIndex += 1
// === ็ฎๆ 2 - ่็ดซไธป้ข ===
tp2Pct = calcTakeProfitPercentage(entryPrice, takeProfit2, entryType)
tp2Reached = na(takeProfit2) ? false :
(entryType == "ๅคๅ" ? high >= takeProfit2 : low <= takeProfit2)
tp2Icon = tp2Reached ? " โ" : ""
tp2Color = tp2Reached ? color.new(#66ff99, 0) : color.new(#cc99ff, 0)
tp2BgColor = tp2Reached ? color.new(#0d2619, 0) : color.new(#1a0d26, 0)
table.cell(infoTable, 0, rowIndex, "ๆญข็็ฎๆ 2", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(takeProfit2) + tp2Pct + tp2Icon,
text_color=tp2Color,
text_size=getTableSize(), bgcolor=tp2BgColor)
rowIndex += 1
// === ็ไบๆฏ่ก - ่็ดซไธป้ข ===
if showRatio
rrColor = color.new(#9999ff, 0)
rrBgColor = color.new(#0d0d1a, 0)
if not na(riskRewardRatio)
if riskRewardRatio >= 2
rrColor := color.new(#66ff99, 0)
rrBgColor := color.new(#0d2619, 0)
else if riskRewardRatio >= 1
rrColor := color.new(#ffcc99, 0)
rrBgColor := color.new(#1a1a0d, 0)
else
rrColor := color.new(#ff9966, 0)
rrBgColor := color.new(#1a1a0d, 0)
table.cell(infoTable, 0, rowIndex, "็ไบๆฏไพ", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, riskRewardStr,
text_color=rrColor,
text_size=getTableSize(), bgcolor=rrBgColor)
rowIndex += 1
// === ๅ
่ดฃๅฃฐๆ่ก - ่็ดซไธป้ข ===
table.cell(infoTable, 0, rowIndex, "โ ้ฃ้ฉๆ็คบ", text_color=color.new(#9999ff, 0),
text_size=size.small, bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, "ไป
ไพๅ่๏ผไธๆๆๆ่ตๅปบ่ฎฎ๏ผ็ไบ่ช่ด",
text_color=color.new(#9999ff, 0),
text_size=size.small, bgcolor=color.new(#1a1a4d, 0))
VB-MainLiteVB-MainLite โ v1.0 Initial Release
Overview
VB-MainLite is a consolidated market-structure and execution framework designed to streamline decision-making into a single chart-level view. The script combines multi-timeframe trend, volatility, volume, and liquidity signals into one cohesive visual layer, reducing indicator clutter while preserving depth of information for active traders.
Core Architecture
Trend Backbone โ EMA 200
Dedicated EMA 200 acts as the primary trend filter and higher-timeframe bias reference.
Serves as the โspineโ of the system for contextualizing all secondary signals (swings, reversals, volume events, etc.).
Custom MA Suite (Envelope Ready)
Four configurable moving averages with flexible source, length, and smoothing.
Default configuration (preset idea: โ8/89 Envelopeโ):
MA #1: EMA 8 on high
MA #2: EMA 8 on low
MA #3: EMA 89 on high
MA #4: EMA 89 on low
All four are disabled by default to keep the chart minimal. Users can toggle them on from the Custom MAs group for envelope or cloud-style configurations.
NadarayaโWatson Smoother (Swing Framework)
Gaussian-kernel NadarayaโWatson regression applied to price (hl2) to build a smooth synthetic curve.
Two layers of functionality:
Swing labels (โฒ / โผ) at inflection points in the smoothed curve.
Optional curve line that visually tracks the turning structure over the last ~500 bars.
Designed to surface early swing potential before standard MAs react.
Hull Moving Average (Trend Overlay)
Optional Hull MA (HMA) for faster trend visualization.
Color-coded by slope (buy/sell bias).
Default: off to prevent overloading the chart; can be enabled under Hull MA settings.
Momentum, Exhaustion & Pattern Engine
CCI-Based Bar Coloring
CCI applied to close with configurable thresholds.
Overbought / oversold CCI zones map directly into candle coloring to visually highlight short-term momentum extremes.
RSI Top / Bottom Exhaustion Finder
RSI logic applied separately to high-driven (tops) and low-driven (bottoms) sequences.
Plots:
Top arrows where high-side RSI stretches into high-risk territory.
Bottom arrows where low-side RSI indicates exhaustion on the downside.
Useful as confluence around the Nadaraya swing turns and EMA 200 regime.
Engulfing + MA Trend Engine (โFat Bull / Fat Bearโ)
Detects bullish and bearish engulfing patterns, then combines them with MA trend cross logic.
Only when both pattern and MA regime align does the engine flag:
Fat Bull (Engulf + MA aligned long)
Fat Bear (Engulf + MA aligned short)
Candles are marked via conditional barcolor to highlight strong, structured shifts in control.
Fat Finger Detection (Wick Spikes / Stop Runs)
Identifies abnormal wick extensions relative to the prior barโs body range with configurable tolerance.
Supports detection of potential liquidity grabs, stop runs, or โexcessโ that may precede reversals or mean-reversion behavior.
Volume & Liquidity Intelligence
Bull Snort (Aggressive Buy Spikes)
Flags events where:
Volume is significantly above the 50-period average, and
Price closes in the upper portion of the bar and above prior close.
Plots a labeled marker below the bar to indicate aggressive upside initiative by buyers.
Pocket Pivots (Accumulation Flags)
Compares current volume vs prior 10 sessions with a filter on prior โupโ days.
Highlights pocket pivot days where current green candle volume outclasses recent down-day volumes, suggesting stealth accumulation.
Delta Volume Core (Directional Volume by Price)
Internal volume-by-price style engine over a user-defined lookback.
Splits volume into up-close and down-close buckets across dynamic price bins.
Feeds into S&R and ICT zone logic to quantify where buying vs selling pressure built up.
Structural Context: S&R and ICT Zones
S&R Power Channel
Computes local high/low band over a configurable lookback window.
Renders:
Upper and lower S&R channel lines.
Shaded support / resistance zones using boxes.
Adds Buy Power / Sell Power metrics based on the ratio of up vs down bars inside the window, displayed directly in the zone overlays.
Drops โ markers where price interacts dynamically with the top or bottom band, highlighting reaction points.
ICT-Style Premium / Discount & Macro Zones
Two tiered structures:
Local Premium / Discount zones over a shorter SR window.
Macro Premium / Discount zones over a longer macro window.
Each zone:
Uses underlying directional volume to annotate accumulation vs distribution bias.
Provides Delta Volume Bias shading in the mid-band region, visually encoding whether local power flows are net-buying or net-selling.
Enables traders to quickly see whether current trade location is in a local/macro discount or premium context while still respecting volume profile.
Positioning Intelligence: PCD (Stocks)
Position Cost Distribution (PCD) โ Stocks Only
Available for stock symbols on intraday up to daily timeframe (โค 1D).
Uses:
TOTAL_SHARES_OUTSTANDING fundamentals,
Daily OHLCV snapshot, and
A bucketed distribution engine
to approximate cost basis distribution across price.
Outputs:
Horizontal โPCD barsโ to the right of current price, density-scaled by estimated share concentration.
Color-coding by profitability relative to current price (profitable vs unprofitable positions).
Labels for:
Current price
Average cost
Profit ratio (share % below current price)
90% cost range
70% cost range
Range overlap as a measure of clustering / concentration.
Multi-Timeframe Trend: Two-Pole Gaussian Dashboard
Two-Pole Gaussian Filter (Line + Cloud)
Smooths a user-selected source (default: close) using a two-pole Gaussian filter with tunable alpha.
Plots:
A thin Gaussian trend line, and
A thick Gaussian โcloudโ line with transparency, colored by slope vs past (offsetG).
Functions as a responsive trend backbone that is more sensitive than EMA 200 but less noisy than raw price.
Multi-Timeframe Gaussian Dashboard
Evaluates Gaussian trend direction across up to six timeframes (e.g., 1H / 2H / 4H / Daily / Weekly).
Renders a compact bottom-right table:
Header: symbol + overall bias arrow (up / down) based on average trend alignment.
Row of colored cells per timeframe (green for uptrend, magenta for downtrend) with human-readable TF labels (e.g., โ60Mโ, โ4Hโ, โ1Dโ).
Gives an immediate read on whether intraday, swing, and higher-timeframe flows are aligned or fragmented.
Default Configuration & Usage Guidance
Default state after adding the script:
Enabled by default:
EMA 200 trend backbone
NadarayaโWatson swing labels and curve
CCI bar coloring
RSI top/bottom arrows
Fat Bull / Fat Bear engine
Bull Snort & Pocket Pivots
S&R Power Channel
ICT Local + Macro zones
Two-pole Gaussian line + cloud + dashboard
PCD engine for stocks (auto-active where data is available)
Disabled by default (opt-in):
Custom MA suite (4x MAs, preset as EMA 8/8/89/89)
Hull MA overlay
How traders can use VB-MainLite in practice:
Use EMA 200 + Gaussian dashboard to define top-down directional bias and avoid trading directly against multi-TF trend.
Use Nadaraya swing labels, RSI exhaustion arrows, and CCI bar colors to time entries within that higher-timeframe bias.
Use Fat Bull / Fat Bear events as structured confirmation that both pattern and MA regime have flipped in the same direction.
Use Bull Snort, Pocket Pivots, and S&R / ICT zones to align execution with liquidity, volume, and location (premium vs discount).
On stocks, use PCD as a positioning map to understand trapped supply, support zones near crowded cost basis, and where profit-taking is likely.
็ผ ไธญ็ฆ
V6Pro"ChanLun" is a highly regarded technical analysis method originating in China. Since its introduction in 2006, ChanLun has quickly gained significant attention and a strong following in the Chinese trading community due to its remarkable ability to navigate complex market dynamics.
ChanLun places great emphasis on market structure, price action, momentum, and the intricate interactions between market forces. It recognizes that the market operates in cyclical patterns and aims to capture the underlying structure and rhythm of price movements. Through detailed analysis of the intricate relationship between price and time, it provides traders with a unique perspective on market trends, potential reversals, and key turning points.
๐ Algorithm
๐ต Step 1: Candlestick Conversion
In ChanLun, candlestick analysis pays less attention to the opening/closing prices and wicks, focusing instead on the range that the stock price reaches. Therefore, the first step in ChanLun involves converting each candlestick to include only the high and low prices, ignoring other elements.
๐ต Step 2: Candlestick Standardization
In the second step, the converted candlesticks are standardized to ensure strict directional consistency and to eliminate the presence of inner or outer bars. For any two adjacent candlesticks A and B, if one price range completely contains the other, A and B are merged into a new candlestick C. If A is in an uptrend from the previous candlestick, C is defined as High(C) = max(High(A), High(B)) and Low(C) = max(Low(A), Low(B)). If A is in a downtrend from the previous candlestick, C is defined as High(C) = min(High(A), High(B)) and Low(C) = min(Low(A), Low(B)).
After completing these steps, when considering any adjacent candlesticks A and B, we can always observe one of the following conditions:
1. High(A) > High(B) and Low(A) > Low(B)
2. High(A) < High(B) and Low(A) < Low(B)
The diagram below illustrates how the candlesticks are displayed after this step.
๐ต Step 3: Fractals
A "fractal" refers to a pattern formed by three consecutive "normalized" candlesticks, where the middle candlestick shows significantly higher or lower values compared to the surrounding candlesticks. When considering three adjacent candlesticks A, B, and C, we have one of two conditions:
1. High (B) > High (A) and High (B) > High (C) and Low (B) > Low (A) and Low (B) > Low (C)
2ใ High (B) < Low (A) and High (B) < Low (C) and Low (B) < Low (A) and Low (B) < Low (C) For
In #1 above, we refer to the combination of A, B, and C as the "top fractal", while for #2 we specify it as the "bottom fractal".
The image below illustrates all fractals, with the red triangle indicating the top fractal and the green triangle indicating the bottom splitting.
๐ต Step 4: Strokes
A "stroke" is a line that connects the top fractal and the bottom fractal, following these rules:
1. There must be at least one "free" candlestick between these fractals, which means it is not part of the top or bottom split. This guarantees that the stroke contains at least five candlesticks from start to finish.
2. The top fractal must have a higher price compared to the bottom fractal.
3. The end fractal should represent the highest or lowest point within the entire stroke range. (There is an option in this indicator to enable or disable this rule.)
Brushstrokes enable traders to identify and visualize significant price movements or trends while effectively filtering out minor fluctuations.
๐ต Step 5: Segmentation
A "subdivision" is a higher-level line that connects the start and end points of at least three consecutive strokes, reflecting the trend of the current market structure. As new strokes emerge, it continues to extend until there is a break in the market structure. A breakout occurs when an uptrend forms lower highs and lower lows, or when a downtrend forms higher highs and higher lows. It is important to note that within the trading range, the brushstrokes typically exhibit higher highs and lower lows or higher lows and lower highs patterns (similar to the inner and outer bars). In this case, the brushstrokes will merge in a similar manner to the candlesticks described earlier until there is a clear breakout in the market structure. Contrary to brushstrokes, segments provide a relatively stable depiction of market trends on higher time frames.
It is important to note that the algorithm used to calculate line segments from strokes can again be applied recursively to the generated line segments, forming higher-level line segments that represent market trends over a larger time frame.
๐ต Step 6: Pivot
In ChanLun, the term "pivot" does not represent a price reversal point. Instead, it refers to a trading range where the security's price tends to fluctuate. Within a given "Segment," a pivot is determined by the overlap of two consecutive strokes moving in opposite directions along the segment. When two downward trend strokes, A and B, form a pivot P within an upward trend segment S, the upper and lower boundaries of the pivot are defined as follows:
1. Upper limit (P) = min(high(A), high(B))
2. Lower limit (P) = max(low(A), low(B))
The pivot range is usually where consolidation and high trading volume occur.
If future strokes moving in the opposite direction along the current segment overlap with the upper and lower boundaries of the pivot, those strokes will merge into the existing pivot, extending it along the x-axis. A new pivot is formed when two consecutive strokes moving in the opposite direction along the current segment intersect each other without overlapping the previous pivot.
Similarly, pivots can be recursively identified in higher-level segments. The blue boxes below indicate "Segment Pivots" identified in the context of higher-level segments.
๐ต Step 7: Buy/Sell Points
ChanLun defines three types of buy/sell points.
1. Type 1 Buy and Sell Points: Also called trend reversal points. These points mark where an old segment ends and a new segment begins.
2. Type 2 Buy and Sell Points: Also called trend continuation points. These points occur when the price is in a trend, indicating trend continuation. In an uptrend, Type 2 buy points are rebound points after the price retraces to previous lows or support levels, signaling a likely continuation of the upward movement. In a downtrend, Type 2 sell points are pullback points after the price bounces to previous highs or resistance levels, signaling a likely continuation of the downward movement.
3. Type 3 Buy and Sell Points: These points represent retests of a pivot range breakout. The presence of these retest points indicates that the price may continue to move up/down above/below the pivot level.
Astute readers may notice that these buy/sell points are lagging indicators. For example, multiple candlesticks will have occurred by the time a new segment is confirmed at a Type 1 buy/sell point in that segment. In fact, buy/sell points do lag behind actual market movements. However, ChanLun addresses this issue through multi-timeframe analysis. By examining buy/sell points confirmed in lower timeframes, additional confidence can be gained in determining the overall trend of higher timeframes.
๐ต Step 8: Divergence
Another core technique in ChanLun is using divergence to predict the occurrence of Type 1 buy/sell points. While MACD is the most commonly used indicator for detecting divergence, other indicators like RSI can also serve this purpose.
๐ Summary
Essentially, ChanLun is a powerful technical analysis method that combines careful examination and interpretation of price charts, the application of technical indicators and quantitative tools, and keen attention to multiple timeframes. Its goal is to identify current market trends and uncover potential trading opportunities. What sets ChanLun apart is its holistic approach, which integrates both qualitative and quantitative analysis to facilitate informed and successful trading decisions.
โ็ผ ่ฎบโๆฏไธ็ง่ตทๆบไบไธญๅฝ็ๅคๅๆจๅด็ๆๆฏๅๆๆนๆณใ่ช 2006 ๅนดๆจๅบไปฅๆฅ๏ผChanLun ๅญๅๅ
ถ้ฉพ้ฉญๅคๆๅธๅบๅจๆ็้ๅก่ฝๅ๏ผ่ฟ
้ๅจไธญๅฝไบคๆ็คพๅบไธญ่ทๅพไบๆๅคง็ๅ
ณๆณจๅๅผบๅคง็่ฟฝ้่
ใ
ChanLun ้ๅธธ้่งๅธๅบ็ปๆใไปทๆ ผ่กไธบใๅจ้ไปฅๅๅธๅบๅ้ไน้ด้็ปผๅคๆ็็ธไบไฝ็จใๅฎ่ฎค่ฏๅฐๅธๅบไปฅๅจๆๆงๆจกๅผ่ฟไฝ๏ผๆจๅจๆๆไปทๆ ผๅๅจ็ๅบๅฑ็ปๆๅ่ๅฅใ้่ฟๅฏนไปทๆ ผๅๆถ้ดไน้ด้็ปผๅคๆ็ๅ
ณ็ณป็็ป่ดๅๆ๏ผๅฎไธบไบคๆ่
ๆไพไบๅ
ณไบๅธๅบ่ถๅฟใๆฝๅจ้่ฝฌๅๅ
ณ้ฎ่ฝฌๆ็น็็ฌ็น่ง่งใ
่ฏฅๆๆ ๆไพไบ ChanLun ็่ฎบ็็ป่ด่ๅ
จ้ข็ๅฎๆฝใๅฎๆๅฉไบๅฏนๆๆๅบๆฌ็ปๆ้จๅ่ฟ่กๆทฑๅ
ฅๅๆๅๅฏ่งๅ่กจ็คบ๏ผๅ
ๆฌ โCandlestick Conversionโ๏ผ โCandlestick Standardizationโ๏ผ โFractalโ๏ผ โStrokeโ๏ผ โSegmentโ๏ผ โPivotโ ๅ โBuying/Selling Pointโใ
๐ ็ฎๆณ
๐ต 1 ๆญฅ๏ผ็ๅฐ่ฝฌๆข
ๅจ ChanLun ไธญ๏ผ็ๅฐๅๆ่พๅฐๅ
ณๆณจๅผ็ไปท/ๆถ็ไปทๅ็ฏ่ฏ๏ผ่ๆฏๅผบ่ฐ่กไปท่พพๅฐ็ไปทๆ ผ่ๅดใๅ ๆญค๏ผChanLun ็็ฌฌไธๆญฅๆถๅๅฐๆฏๆ น็ๆก่ฝฌๆขไธบไป
ๅ
ๅซๆ้ซไปทๅๆไฝไปท๏ผ่ๅฟฝ็ฅๅ
ถไปๅ
็ด ใ
๐ต ็ฌฌ 2 ๆญฅ๏ผ็ๅฐๆ ๅๅ
ๅจ็ฌฌไบๆญฅไธญ๏ผๅฏน่ฝฌๆขๅ็็ๅฐ่ฟ่กๆ ๅๅ๏ผไปฅ็กฎไฟไธฅๆ ผ็ๆนๅไธ่ดๆง๏ผๅนถๆถ้คๅ
ๆฑ็บฟๆๅคๆฑ็บฟ็ๅญๅจใๅฏนไบไปปไฝ็ธ้ป็ไธคๆ น็ๆก A ๅ B๏ผๅ
ถไธญไธๆ น็ไปทๆ ผ่ๅดๅฎๅ
จๅ
ๅซๅฆไธๆ น๏ผA ๅ B ่ขซๅๅนถไธบๆฐ็็ๆก Cใๅฆๆ A ไปๅไธๆ น่ก็ๅผๅงๅไธๅ่ถๅฟ๏ผๅ C ๅฐ่ขซๅฎไนไธบๆ้ซไปท ๏ผC๏ผ = ๆๅคงๅผ๏ผๆ้ซไปท ๏ผA๏ผ๏ผ ๆ้ซไปท ๏ผB๏ผ๏ผ ๅๆไฝไปท ๏ผC๏ผ = ๆๅคงๅผ๏ผๆไฝไปท ๏ผA๏ผ๏ผ ๆไฝไปท ๏ผB๏ผ๏ผใๅฆๆ A ไปๅไธๆ น่ก็ๅผๅงๅไธ้่ถๅฟ๏ผๅ C ๅฐ่ขซๅฎไนไธบๆ้ซไปท ๏ผC๏ผ = min๏ผๆ้ซไปท ๏ผA๏ผ๏ผ ๆ้ซไปท ๏ผB๏ผ๏ผ ๅๆไฝไปท ๏ผC๏ผ = min๏ผๆไฝไปท ๏ผA๏ผ๏ผ ๆไฝไปท ๏ผB๏ผ๏ผใ
ๅฎๆ่ฟไบๆญฅ้ชคๅ๏ผๅจ่่ไปปไฝ็ธ้ป็็ๆก A ๅ B ๆถ๏ผๆไปฌๅง็ปๅฏไปฅ่งๅฏๅฐไปฅไธไปปไธๆกไปถ๏ผ
1. ๆ้ซไปท ๏ผA๏ผ > ๆ้ซไปท ๏ผB๏ผ ๅๆไฝไปท ๏ผA๏ผ >ๆไฝไปท ๏ผB๏ผ
2ใๆ้ซไปท ๏ผA๏ผ <ๆ้ซไปท ๏ผB๏ผ ๅๆไฝไปท ๏ผA๏ผ <ๆไฝไปท ๏ผB๏ผ
ไธๅพ่ฏดๆไบๆญคๆญฅ้ชคๅ็ๅฐ็ๆพ็คบๆนๅผใ
๐ต ็ฌฌ 3 ๆญฅ๏ผๅๅฝข
โๅๅฝขโๆฏๆ็ฑไธไธช่ฟ็ปญ็โๆ ๅๅโ็ๅฐๅฝขๆ็ๅฝขๆ๏ผๅ
ถไธญไธญ้ด็็ๅฐไธๅจๅด็็ๅฐ็ธๆฏๆพ็คบๅบๆๆพ็ๆด้ซๆๆดไฝ็ๅผใๅฝ่่ไธไธช็ธ้ป็็ๅฐ AใB ๅ C ๆถ๏ผๆไปฌๆไปฅไธไธคไธชๆกไปถไนไธ๏ผ
1. ๆ้ซไปท ๏ผB๏ผ > ๆ้ซไปท ๏ผA๏ผ ๅ้ซ็น ๏ผB๏ผ >ๆ้ซไปท ๏ผC๏ผ ๅๆไฝไปท ๏ผB๏ผ >ๆไฝไปท ๏ผA๏ผ ๅๆไฝไปท ๏ผB๏ผ >ๆไฝไปท ๏ผC๏ผ
2ใ้ซ ๏ผB๏ผ < ไฝ ๏ผA๏ผ ๅ้ซ ๏ผB๏ผ < ไฝ ๏ผC๏ผ ๅไฝ ๏ผB๏ผ < ไฝ ๏ผA๏ผ ๅไฝ ๏ผB๏ผ < ไฝ ๏ผC๏ผๅฏนไบ
ไธ้ข็ #1๏ผๆไปฌๅฐ AใB ๅ C ็็ปๅ็งฐไธบโ้กถ้จๅๅฝขโ๏ผ่ๅฏนไบ #2๏ผๆไปฌๅฐๅ
ถๆๅฎไธบโๅบ้จๅๅฝขโใ
ไธๅพ่ฏดๆไบๆๆๅๅฝข๏ผๅ
ถไธญ็บข่ฒไธ่งๅฝข่กจ็คบ้กถ้จๅๅฝข๏ผ็ปฟ่ฒไธ่งๅฝข่กจ็คบๅบ้จๅๅฝขใ
๐ต ็ฌฌ 4 ๆญฅ๏ผ็ฌ็ป
โ็ฌ็ปโ ๆฏ่ฟๆฅ้กถ้จๅๅฝขๅๅบ้จๅๅฝข็ไธๆก็บฟ๏ผ้ตๅพชไปฅไธ่งๅ๏ผ
1. ๅจ่ฟไบๅๅฝขไน้ดๅฟ
้กป่ณๅฐๆไธไธช โ่ช็ฑโ ็ๅฐ๏ผ่ฟๆๅณ็ๅฎไธๆฏ้กถ้จๆๅบ้จๅๅฝข็ไธ้จๅใ่ฟไฟ่ฏไบ็ฌ็ปไปๅคดๅฐๅฐพ่ณๅฐๅ
ๅซไบๆ น็ๆกใ
2. ไธๅบ้จๅๅฝข็ธๆฏ๏ผ้กถ้จๅๅฝขๅฟ
้กปๅ
ทๆๆด้ซ็ไปทๆ ผใ
3. ็ซฏ็นๅๅฝขๅบ่กจ็คบๆดไธช็ฌ็ป่ๅดๅ
็ๆ้ซ็นๆๆไฝ็นใ๏ผๆญคๆ็คบๅจไธญๆไธไธช้้กน็จไบๅฏ็จๆ็ฆ็จๆญค่งๅใ
็ฌ่งฆไฝฟไบคๆ่
่ฝๅค่ฏๅซๅๅฏ่งๅ้ๅคง็ไปทๆ ผๆณขๅจๆ่ถๅฟ๏ผๅๆถๆๆๅฐ่ฟๆปคๆๅพฎๅฐ็ๆณขๅจใ
๐ต ็ฌฌ 5 ๆญฅ๏ผ็ปๅ
โ็ปๅโๆฏไธๆกๆด้ซ็บงๅซ็็บฟ๏ผ่ฟๆฅ่ณๅฐ่ฟ็ปญไธไธช็ฌ็ป็่ตท็นๅ็ป็น๏ผๅๆ ไบๅฝๅๅธๅบ็ปๆ็่ถๅฟใ้็ๆฐ็ฌ่งฆ็ๅบ็ฐ๏ผๅฎ็ปง็ปญๅปถไผธ๏ผ็ดๅฐๅธๅบ็ปๆๅบ็ฐไธญๆญใๅฝไธๅ่ถๅฟๅฝขๆ่พไฝ็้ซ็นๅ่พไฝ็ไฝ็น๏ผๆ่
ๅฝไธ้่ถๅฟๅฝขๆๆด้ซ็้ซ็นๅๆด้ซ็ไฝ็นๆถ๏ผๅฐฑไผๅ็็ช็ ดใๅผๅพๆณจๆ็ๆฏ๏ผๅจไบคๆๅบ้ดๅ
๏ผ็ฌ่งฆ้ๅธธ่กจ็ฐๅบๆด้ซ็้ซ็นๅๆดไฝ็ไฝ็นๆๆด้ซ็ไฝ็นๅๆดไฝ็้ซ็นๅฝขๆ๏ผ็ฑปไผผไบๅ
ๆฑๅๅคๆฑ๏ผใๅจ่ฟ็งๆ
ๅตไธ๏ผ็ฌ่งฆๅฐไปฅไธๅ้ขๆ่ฟฐ็็ๅฐ็ฑปไผผ็ๆนๅผๅๅนถ๏ผ็ดๅฐๅธๅบ็ปๆๅบ็ฐๆๆพ็็ช็ ดใไธ็ฌ่งฆ็ธๅ๏ผๅๆฎตๅจๆด้ซ็ๆถ้ด่ๅดๅ
ๆไพไบๅฏนๅธๅบ่ถๅฟ็็ธๅฏน็จณๅฎ็ๆ่ฟฐใ
้่ฆๆณจๆ็ๆฏ๏ผ็จไบไป็ฌ็ป่ฎก็ฎ็บฟๆฎต็็ฎๆณๅฏไปฅๅๆฌก้ๅฝๅฐๅบ็จไบ็ๆ็็บฟๆฎต๏ผๅฝขๆๆด้ซ็บงๅซ็็บฟๆฎต๏ผไปฃ่กจๆดๅคงๆถ้ด่ๅดๅ
็ๅธๅบ่ถๅฟใ
๐ต ็ฌฌ 6 ๆญฅ๏ผๆข่ฝด
ๅจ ChanLun ไธญ๏ผโๆข่ฝดโไธ่ฏๅนถไธ่กจ็คบไปทๆ ผๅ่ฝฌ็นใ็ธๅ๏ผๅฎไปฃ่กจ่ฏๅธไปทๆ ผ่ถไบๆณขๅจ็ไบคๆๅบ้ดใๅจ็ปๅฎ็ โSegmentโ ไธญ๏ผๆข่ฝด็ฑๆฒฟ็บฟๆฎต็ธๅๆนๅ็งปๅจ็ไธคไธช่ฟ็ปญ็ฌ็ป็้ๅ ๅณๅฎใๅฝไธคไธชไธ้่ถๅฟ็ฌ่งฆ A ๅ B ๅจไธๅ่ถๅฟๆฎต S ๅ
ๅฝขๆๆข่ฝด P ๆถ๏ผๆข่ฝด็ไธ้ๅไธ้ๅฎไนๅฆไธ๏ผ
1. ไธ้ ๏ผP๏ผ = min๏ผๆ้ซ ๏ผA๏ผ๏ผ ๆ้ซ ๏ผ
pein:
B๏ผ
2. ไธ้ ๏ผP๏ผ = ๆๅคงๅผ๏ผๆไฝ ๏ผA๏ผ๏ผ ๆไฝ ๏ผB๏ผ๏ผ
ๆข่ฝด่ๅด้ๅธธๆฏๅ็็ๆดๅไบคๆ้้ซ็ๅฐๆนใ
ๅฆๆๆฒฟๅฝๅ็บฟๆฎต็็ธๅๆนๅ็งปๅจ็ๆชๆฅ็ฌ่งฆไธๆข่ฝด็ไธ้ๅไธ้้ๅ ๏ผๅ่ฏฅ็ฌๅๅฐๅๅนถๅฐ็ฐๆๆข่ฝดไธญ๏ผๅนถๆฒฟ x ่ฝดๅปถไผธๆข่ฝดใๅฝๆฒฟๅฝๅ็บฟๆฎต็็ธๅๆนๅ็งปๅจ็ไธคไธช่ฟ็ปญ็ฌ่งฆๅฝผๆญค็ธไบค่ไธไธๅไธไธช่ฝด้ๅ ๆถ๏ผๅฐๅฝขๆๆฐ็ๆข่ฝดใ
ๅๆ ท๏ผไนๅฏไปฅๅจๆด้ซ็บงๅซ็ segment ไธญ้ๅฝ่ฏๅซ pivotsใไธ้ข็่่ฒๆก่กจ็คบๅจๆด้ซ็บงๅซๅบๆฎต็ไธไธๆไธญๆ ่ฏ็โSegment Pivotsโใ
๐ต ็ฌฌ 7 ๆญฅ๏ผ่ดญไนฐ/ๅบๅฎ็งฏๅ
ChanLun ไธญๅฎไนไบไธ็ง็ฑปๅ็่ดญไนฐ/ๅบๅฎ็งฏๅใ
1. ็ฑปๅ 1 ไนฐๅ
ฅๅๅๅบ็น๏ผไน็งฐไธบ่ถๅฟๅ่ฝฌ็นใ่ฟไบ็นๆฏๆง่ทฏๆฎต็ปๆญขๅ็ๆๆฐ่ทฏๆฎต็ไฝ็ฝฎใ
2. ็ฑปๅ 2 ไนฐๅ
ฅๅๅๅบ็น๏ผไน็งฐไธบ่ถๅฟๅปถ็ปญ็นใ่ฟไบ็นๅ็ๅจไปทๆ ผๅคไบ่ถๅฟไธญๆถ๏ผๆ ๅฟ็่ถๅฟ็ๅปถ็ปญใๅจไธๅ่ถๅฟไธญ๏ผ็ฑปๅ 2 ไนฐ็นๆฏไปทๆ ผๅๆค่ณๅ
ๅไฝ็นๆๆฏๆไฝๅ็ๅๅผน็น๏ผ่กจๆไปทๆ ผๅฏ่ฝไผ็ปง็ปญไธๆถจใๅจไธ่ท่ถๅฟไธญ๏ผ็ฑปๅ 2 ๅ็นๆฏไปทๆ ผๅๅผน่ณๅ้ซ็นๆ้ปๅไฝๅ็ๅ่ฐ็น๏ผ่กจๆไปทๆ ผๅฏ่ฝไผ็ปง็ปญไธ่ทใ
3. ็ฑปๅ 3 ไนฐๅ
ฅๅๅๅบ็น๏ผ่ฟไบ็น่กจ็คบๅฏนๆข่ฝด่ๅด็ช็ ด็้ๆฐๆต่ฏใ่ฟไบ้ๆฐๆต่ฏ็น็ๅญๅจ่กจๆ๏ผไปทๆ ผๆๅฏ่ฝๅจๆข่ฝดๆฐดๅนณไธๆน/ไธๆน็ปง็ปญๅไธ/ๅไธ็งปๅจใ
ๆๅ็่ฏป่
ๅฏ่ฝไผๆณจๆๅฐ่ฟไบไนฐๅ
ฅ/ๅๅบ็นๆฏๆปๅๆๆ ใไพๅฆ๏ผๅฝ็กฎ่ฎคๆฐๅบๆฎตๆถ๏ผ่ช่ฏฅๅบๆฎต็็ฑปๅ 1 ไนฐๅ
ฅ/ๅๅบ็นไปฅๆฅๅทฒ็ปๅ็ไบๅคๆ น็ๅฐใ
ไบๅฎไธ๏ผไนฐๅ
ฅ/ๅๅบ็น็กฎๅฎ่ฝๅไบๅฎ้
ๅธๅบ่ตฐๅฟใ็ถ่๏ผChanLun ้่ฟไฝฟ็จๅคๆถ้ดๆกๆถๅๆ่งฃๅณไบ่ฟไธช้ฎ้ขใ้่ฟๆฃๆฅ่พไฝๆถ้ดๆกๆถไธญ็กฎ่ฎค็ไนฐๅ
ฅ/ๅๅบ็น๏ผๅฏไปฅๅจ็กฎๅฎ่พ้ซๆถ้ดๆกๆถ็ๆดไฝ่ถๅฟๆน้ข่ทๅพ้ขๅค็ไฟกๅฟใ
๐ต ็ฌฌ 8 ๆญฅ๏ผ่็ฆป
ChanLun ็ๅฆไธไธชๆ ธๅฟๆๆฏๆฏๅบ็จ่็ฆปๆฅ้ขๆต 1 ๅไนฐๅ
ฅ/ๅๅบ็น็ๅบ็ฐใ่ฝ็ถ MACD ๆฏๆฃๆต่็ฆปๆๅธธ็จ็ๆๆ ๏ผไฝ RSI ็ญๅ
ถไปๆๆ ไนๅฏ็จไบๆญค็ฎ็ใ
๐ ๆป็ป
ไปๆฌ่ดจไธ่ฎฒ๏ผChanLun ๆฏไธ็งๅผบๅคง็ๆๆฏๅๆๆนๆณ๏ผๅฎ็ปๅไบๅฏนไปทๆ ผๅพ่กจ็ไป็ปๆฃๆฅๅ่งฃ้ใๆๆฏๆๆ ๅๅฎ้ๅทฅๅ
ท็ๅบ็จไปฅๅๅฏนๅคไธชๆถ้ดๆกๆถ็ๆ้ๅ
ณๆณจใๅ
ถ็ฎๆ ๆฏ็กฎๅฎๅฝๅ็ๅธๅบ่ถๅฟๅนถๅ็ฐๆฝๅจ็ไบคๆๅๆฏใChanLun ็ไธไผไธๅไนๅคๅจไบๅ
ถๆดไฝๆนๆณ๏ผ่ฏฅๆนๆณ่ๅไบๅฎๆงๅๅฎ้ๅๆ๏ผไปฅไฟ่ฟๆๆบๅๆๅ็ไบคๆๅณ็ญใ
Kernel Market Dynamics [WFO - MAB]Kernel Market Dynamics
โ๏ธ CORE INNOVATION: KERNEL-BASED DISTRIBUTION ANALYSIS
The Kernel Market Dynamics system represents a fundamental departure from traditional technical indicators. Rather than measuring price levels, momentum, or oscillator extremes, KMD analyzes the statistical distribution of market returns using advanced kernel methods from machine learning theory. This allows the system to detect when market behavior has fundamentally changedโnot just when price has moved, but when the underlying probability structure has shifted.
The Distribution Hypothesis:
Traditional indicators assume markets move in predictable patterns. KMD assumes something more profound: markets exist in distinct distributional regimes , and profitable trading opportunities emerge during regime transitions . When the distribution of recent returns diverges significantly from the historical baseline, the market is restructuringโand that's when edge exists.
Maximum Mean Discrepancy (MMD):
At the heart of KMD lies a sophisticated statistical metric called Maximum Mean Discrepancy. MMD measures the distance between two probability distributions by comparing their representations in a high-dimensional feature space created by a kernel function.
The Mathematics:
Given two sets of normalized returns:
โข Reference period (X) : Historical baseline (default 100 bars)
โข Test period (Y) : Recent behavior (default 20 bars)
MMD is calculated as:
MMDยฒ = E + E - 2ยทE
Where:
โข E = Expected kernel similarity within reference period
โข E = Expected kernel similarity within test period
โข E = Expected cross-similarity between periods
When MMD is low : Test period behaves like reference (stable regime)
When MMD is high : Test period diverges from reference (regime shift)
The final MMD value is smoothed with EMA(5) to reduce single-bar noise while maintaining responsiveness to genuine distribution changes.
The Kernel Functions:
The kernel function defines how similarity is measured. KMD offers four mathematically distinct kernels, each with different properties:
1. RBF (Radial Basis Function / Gaussian):
โข Formula: k(x,y) = exp(-dยฒ / (2ยทฯยฒยทscale))
โข Properties: Most sensitive to distribution changes, smooth decision boundaries
โข Best for: Clean data, clear regime shifts, low-noise markets
โข Sensitivity: Highest - detects subtle changes
โข Use case: Stock indices, major forex pairs, trending environments
2. Laplacian:
โข Formula: k(x,y) = exp(-|d| / ฯ)
โข Properties: Medium sensitivity, robust to moderate outliers
โข Best for: Standard market conditions, balanced noise/signal
โข Sensitivity: Medium - filters minor fluctuations
โข Use case: Commodities, standard timeframes, general trading
3. Cauchy (Default - Most Robust):
โข Formula: k(x,y) = 1 / (1 + dยฒ/ฯยฒ)
โข Properties: Heavy-tailed, highly robust to outliers and spikes
โข Best for: Noisy markets, choppy conditions, crypto volatility
โข Sensitivity: Lower - only major distribution shifts trigger
โข Use case: Cryptocurrencies, illiquid markets, volatile instruments
4. Rational Quadratic:
โข Formula: k(x,y) = (1 + dยฒ/(2ยทฮฑยทฯยฒ))^(-ฮฑ)
โข Properties: Tunable via alpha parameter, mixture of RBF kernels
โข Alpha < 1.0: Heavy tails (like Cauchy)
โข Alpha > 3.0: Light tails (like RBF)
โข Best for: Adaptive use, mixed market conditions
โข Use case: Experimental optimization, regime-specific tuning
Bandwidth (ฯ) Parameter:
The bandwidth controls the "width" of the kernel, determining sensitivity to return differences:
โข Low bandwidth (0.5-1.5) : Narrow kernel, very sensitive
- Treats small differences as significant
- More MMD spikes, more signals
- Use for: Scalping, fast markets
โข Medium bandwidth (1.5-3.0) : Balanced sensitivity (recommended)
- Filters noise while catching real shifts
- Professional-grade signal quality
- Use for: Day/swing trading
โข High bandwidth (3.0-10.0) : Wide kernel, less sensitive
- Only major distribution changes register
- Fewer, stronger signals
- Use for: Position trading, trend following
Adaptive Bandwidth:
When enabled (default ON), bandwidth automatically scales with market volatility:
Effective_BW = Base_BW ร max(0.5, min(2.0, 1 / volatility_ratio))
โข Low volatility โ Tighter bandwidth (0.5ร base) โ More sensitive
โข High volatility โ Wider bandwidth (2.0ร base) โ Less sensitive
This prevents signal flooding during wild markets and avoids signal drought during calm periods.
Why Kernels Work:
Kernel methods implicitly map data to infinite-dimensional space where complex, nonlinear patterns become linearly separable. This allows MMD to detect distribution changes that simpler statistics (mean, variance) would miss. For example:
โข Same mean, different shape : Traditional metrics see nothing, MMD detects shift
โข Same volatility, different skew : Oscillators miss it, MMD catches it
โข Regime rotation : Price unchanged, but return distribution restructured
The kernel captures the entire distributional signature โnot just first and second moments.
๐ฐ MULTI-ARMED BANDIT FRAMEWORK: ADAPTIVE STRATEGY SELECTION
Rather than forcing one strategy on all market conditions, KMD implements a Multi-Armed Bandit (MAB) system that learns which of seven distinct strategies performs best and dynamically selects the optimal approach in real-time.
The Seven Arms (Strategies):
Each arm represents a fundamentally different trading logic:
ARM 0 - MMD Regime Shift:
โข Logic: Distribution divergence with directional bias
โข Triggers: MMD > threshold AND direction_bias confirmed AND velocity > 5%
โข Philosophy: Trade the regime transition itself
โข Best in: Volatile shifts, breakout moments, crisis periods
โข Weakness: False alarms in choppy consolidation
ARM 1 - Trend Following:
โข Logic: Aligned EMAs with strong ADX
โข Triggers: EMA(9) > EMA(21) > EMA(50) AND ADX > 25
โข Philosophy: Ride established momentum
โข Best in: Strong trending regimes, directional markets
โข Weakness: Late entries, whipsaws at reversals
ARM 2 - Breakout:
โข Logic: Bollinger Band breakouts with volume
โข Triggers: Price crosses BB outer band AND volume > 1.2ร average
โข Philosophy: Capture volatility expansion events
โข Best in: Range breakouts, earnings, news events
โข Weakness: False breakouts in ranging markets
ARM 3 - RSI Mean Reversion:
โข Logic: RSI extremes with reversal confirmation
โข Triggers: RSI < 30 with uptick OR RSI > 70 with downtick
โข Philosophy: Fade overbought/oversold extremes
โข Best in: Ranging markets, mean-reverting instruments
โข Weakness: Fails in strong trends, catches falling knives
ARM 4 - Z-Score Statistical Reversion:
โข Logic: Price deviation from 50-period mean
โข Triggers: Z-score < -2 (oversold) OR > +2 (overbought) with reversal
โข Philosophy: Statistical bounds reversion
โข Best in: Stable volatility regimes, pairs trading
โข Weakness: Trend continuation through extremes
ARM 5 - ADX Momentum:
โข Logic: Strong directional movement with acceleration
โข Triggers: ADX > 30 with DI+ or DI- strengthening
โข Philosophy: Momentum begets momentum
โข Best in: Trending with increasing velocity
โข Weakness: Late exits, momentum exhaustion
ARM 6 - Volume Confirmation:
โข Logic: OBV trend + volume spike + candle direction
โข Triggers: OBV > EMA(20) AND volume > average AND bullish candle
โข Philosophy: Follow institutional money flow
โข Best in: Liquid markets with reliable volume
โข Weakness: Manipulated volume, thin markets
Q-Learning with Rewards:
Each arm maintains a Q-value representing its expected reward. After every bar, the system calculates a reward based on the arm's signal and actual price movement:
Reward Calculation:
If arm signaled LONG:
reward = (close - close ) / close
If arm signaled SHORT:
reward = -(close - close ) / close
If arm signaled NEUTRAL:
reward = 0
Penalty multiplier: If loss > 0.5%, reward ร 1.3 (punish big losses harder)
Q-Value Update (Exponential Moving Average):
Q_new = Q_old + ฮฑ ร (reward - Q_old)
Where ฮฑ (learning rate, default 0.08) controls adaptation speed:
โข Low ฮฑ (0.01-0.05): Slow, stable learning
โข Medium ฮฑ (0.06-0.12): Balanced (recommended)
โข High ฮฑ (0.15-0.30): Fast, reactive learning
This gradually shifts Q-values toward arms that generate positive returns and away from losing arms.
Arm Selection Algorithms:
KMD offers four mathematically distinct selection strategies:
1. UCB1 (Upper Confidence Bound) - Recommended:
Formula: Select arm with max(Q_i + cยทโ(ln(t)/n_i))
Where:
โข Q_i = Q-value of arm i
โข c = exploration constant (default 1.5)
โข t = total pulls across all arms
โข n_i = pulls of arm i
Philosophy: Balance exploitation (use best arm) with exploration (try uncertain arms). The โ(ln(t)/n_i) term creates an "exploration bonus" that decreases as an arm gets more pulls, ensuring all arms get sufficient testing.
Theoretical guarantee: Logarithmic regret bound - UCB1 provably converges to optimal arm selection over time.
2. UCB1-Tuned (Variance-Aware UCB):
Formula: Select arm with max(Q_i + โ(ln(t)/n_i ร min(0.25, V_i + โ(2ยทln(t)/n_i))))
Where V_i = variance of rewards for arm i
Philosophy: Incorporates reward variance into exploration. Arms with high variance (unpredictable) get less exploration bonus, focusing effort on stable performers.
Better bounds than UCB1 in practice, slightly more conservative exploration.
3. Epsilon-Greedy (Simple Random):
Algorithm:
With probability ฮต: Select random arm (explore)
With probability 1-ฮต: Select highest Q-value arm (exploit)
Default ฮต = 0.10 (10% exploration, 90% exploitation)
Philosophy: Simplest algorithm, easy to understand. Random exploration ensures all arms stay updated but may waste time on clearly bad arms.
4. Thompson Sampling (Bayesian):
The most sophisticated selection algorithm, using true Bayesian probability.
Each arm maintains Beta distribution parameters:
โข ฮฑ (alpha) = successes + 1
โข ฮฒ (beta) = failures + 1
Selection Process:
1. Sample ฮธ_i ~ Beta(ฮฑ_i, ฮฒ_i) for each arm using Marsaglia-Tsang Gamma sampler
2. Select arm with highest sample: argmax_i(ฮธ_i)
3. After reward, update:
- If reward > 0: ฮฑ += |reward| ร 100 (increment successes)
- If reward < 0: ฮฒ += |reward| ร 100 (increment failures)
Why Thompson Sampling Works:
The Beta distribution naturally represents uncertainty about an arm's true win rate. Early on with few trials, the distribution is wide (high uncertainty), leading to more exploration. As evidence accumulates, it narrows around the true performance, naturally shifting toward exploitation.
Unlike UCB which uses deterministic confidence bounds, Thompson Sampling is probabilisticโit samples from the posterior distribution of each arm's success rate, providing automatic exploration/exploitation balance without tuning.
Comparison:
โข UCB1: Deterministic, guaranteed regret bounds, requires tuning exploration constant
โข Thompson: Probabilistic, natural exploration, no tuning required, best empirical performance
โข Epsilon-Greedy: Simplest, consistent exploration %, less efficient
โข UCB1-Tuned: UCB1 + variance awareness, best for risk-averse
Exploration Constant (c):
For UCB algorithms, this multiplies the exploration bonus:
โข Low c (0.5-1.0): Strongly prefer proven arms, rare exploration
โข Medium c (1.2-1.8): Balanced (default 1.5)
โข High c (2.0-3.0): Frequent exploration, diverse arm usage
Higher exploration constant in volatile/unstable markets, lower in stable trending environments.
๐ฌ WALK-FORWARD OPTIMIZATION: PREVENTING OVERFITTING
The single biggest problem in algorithmic trading is overfittingโstrategies that look amazing in backtest but fail in live trading because they learned noise instead of signal. KMD's Walk-Forward Optimization system addresses this head-on.
How WFO Works:
The system divides time into repeating cycles:
1. Training Window (default 500 bars): Learn arm Q-values on historical data
2. Testing Window (default 100 bars): Validate on unseen "future" data
Training Phase:
โข All arms accumulate rewards and update Q-values normally
โข Q_train tracks in-sample performance
โข System learns which arms work on historical data
Testing Phase:
โข System continues using arms but tracks separate Q_test metrics
โข Counts trades per arm (N_test)
โข Testing performance is "out-of-sample" relative to training
Validation Requirements:
An arm is only "validated" (approved for live use) if:
1. N_test โฅ Minimum Trades (default 10): Sufficient statistical sample
2. Q_test > 0 : Positive out-of-sample performance
Arms that fail validation are blocked from generating signals, preventing the system from trading strategies that only worked on historical data.
Performance Decay:
At the end of each WFO cycle, all Q-values decay exponentially:
Q_new = Q_old ร decay_rate (default 0.95)
This ensures old performance doesn't dominate forever. An arm that worked 10 cycles ago but fails recently will eventually lose influence.
Decay Math:
โข 0.95 decay after 10 periods โ 0.95^10 = 0.60 (40% forgotten)
โข 0.90 decay after 10 periods โ 0.90^10 = 0.35 (65% forgotten)
Fast decay (0.80-0.90): Quick adaptation, forgets old patterns rapidly
Slow decay (0.96-0.99): Stable, retains historical knowledge longer
WFO Efficiency Metric:
The key metric revealing overfitting:
Efficiency = (Q_test / Q_train) for each validated arm, averaged
โข Efficiency > 0.8 : Excellent - strategies generalize well (LOW overfit risk)
โข Efficiency 0.5-0.8 : Acceptable - moderate generalization (MODERATE risk)
โข Efficiency < 0.5 : Poor - strategies curve-fitted to history (HIGH risk)
If efficiency is low, the system has learned noise. Training performance was good but testing (forward) performance is weakโclassic overfitting.
The dashboard displays real-time WFO efficiency, allowing users to gauge system robustness. Low efficiency should trigger parameter review or reduced position sizing.
Why WFO Matters:
Consider two scenarios:
Scenario A - No WFO:
โข Arm 3 (RSI Reversion) shows Q-value of 0.15 on all historical data
โข System trades it aggressively
โข Reality: It only worked during one specific ranging period
โข Live trading: Fails because market has trended since backtest
Scenario B - With WFO:
โข Arm 3 shows Q_train = 0.15 (good in training)
โข But Q_test = -0.05 (loses in testing) with 12 test trades
โข N_test โฅ 10 but Q_test < 0 โ Arm BLOCKED
โข System refuses to trade it despite good backtest
โข Live trading: Protected from false strategy
WFO ensures only strategies that work going forward get used, not just strategies that fit the past.
Optimal Window Sizing:
Training Window:
โข Too short (100-300): May learn recent noise, insufficient data
โข Too long (1000-2000): May include obsolete market regimes
โข Recommended: 4-6ร testing window (default 500)
Testing Window:
โข Too short (50-80): Insufficient validation, high variance
โข Too long (300-500): Delayed adaptation to regime changes
โข Recommended: 1/5 to 1/4 of training (default 100)
Minimum Trades:
โข Too low (5-8): Statistical noise, lucky runs validate
โข Too high (30-50): Many arms never validate, system rarely trades
โข Recommended: 10-15 (default 10)
โ๏ธ WEIGHTED CONFLUENCE SYSTEM: MULTI-FACTOR SIGNAL QUALITY
Not all signals are created equal. KMD implements a sophisticated 100-point quality scoring system that combines eight independent factors with different importance weights.
The Scoring Framework:
Each potential signal receives a quality score from 0-100 by accumulating points from aligned factors:
CRITICAL FACTORS (20 points each):
1. Bandit Arm Alignment (20 points):
โข Full points if selected arm's signal matches trade direction
โข Zero points if arm disagrees
โข Weight: Highest - the bandit selected this arm for a reason
2. MMD Regime Quality (20 points):
โข Requires: MMD > dynamic threshold AND directional bias confirmed
โข Scaled by MMD percentile (how extreme vs history)
โข If MMD in top 10% of history: 100% of 20 points
โข If MMD at 50th percentile: 50% of 20 points
โข Weight: Highest - distribution shift is the core signal
HIGH IMPACT FACTORS (15 points each):
3. Trend Alignment (15 points):
โข Full points if EMA(9) > EMA(21) > EMA(50) for longs (inverse for shorts)
โข Scaled by ADX strength:
- ADX > 25: 100% (1.0ร multiplier) - strong trend
- ADX 20-25: 70% (0.7ร multiplier) - moderate trend
- ADX < 20: 40% (0.4ร multiplier) - weak trend
โข Weight: High - trend is friend, alignment increases probability
4. Volume Confirmation (15 points):
โข Requires: OBV > EMA(OBV, 20) aligned with direction
โข Scaled by volume ratio: vol_current / vol_average
- Volume 1.5ร+ average: 100% of points (institutional participation)
- Volume 1.0-1.5ร average: 67% of points (above average)
- Volume below average: 0 points (weak conviction)
โข Weight: High - volume validates price moves
MODERATE FACTORS (10 points each):
5. Market Structure (10 points):
โข Full points (10) if bullish structure (higher highs, higher lows) for longs
โข Partial points (6) if near support level (within 1% of swing low)
โข Similar logic inverted for bearish trades
โข Weight: Moderate - structure context improves entries
6. RSI Positioning (10 points):
โข For long signals:
- RSI < 50: 100% of points (1.0ร multiplier) - room to run
- RSI 50-60: 60% of points (0.6ร multiplier) - neutral
- RSI 60-70: 30% of points (0.3ร multiplier) - elevated
- RSI > 70: 0 points (0ร multiplier) - overbought
โข Inverse for short signals
โข Weight: Moderate - momentum context, not primary signal
BONUS FACTORS (10 points each):
7. Divergence (10 points):
โข Full 10 points if bullish divergence detected for long (or bearish for short)
โข Zero points otherwise
โข Weight: Bonus - leading indicator, adds confidence when present
8. Multi-Timeframe Confirmation (10 points):
โข Full 10 points if higher timeframe aligned (HTF EMA trending same direction, RSI supportive)
โข Zero points if MTF disabled or HTF opposes
โข Weight: Bonus - macro context filter, prevents counter-trend disasters
Total Maximum: 110 points (20+20+15+15+10+10+10+10)
Signal Quality Calculation:
Quality Score = (Accumulated_Points / Maximum_Possible) ร 100
Where Maximum_Possible = 110 points if all factors active, adjusts if MTF disabled.
Example Calculation:
Long signal candidate:
โข Bandit Arm: +20 (arm signals long)
โข MMD Quality: +16 (MMD high, 80th percentile)
โข Trend: +11 (EMAs aligned, ADX = 22 โ 70% ร 15)
โข Volume: +10 (OBV rising, vol 1.3ร avg โ 67% ร 15 = 10)
โข Structure: +10 (higher lows forming)
โข RSI: +6 (RSI = 55 โ 60% ร 10)
โข Divergence: +0 (none present)
โข MTF: +10 (HTF bullish)
Total: 83 / 110 ร 100 = 75.5% quality score
This is an excellent quality signal - well above threshold (default 60%).
Quality Thresholds:
โข Score 80-100 : Exceptional setup - all factors aligned
โข Score 60-80 : High quality - most factors supportive (default minimum)
โข Score 40-60 : Moderate - mixed confluence, proceed with caution
โข Score 20-40 : Weak - minimal support, likely filtered out
โข Score 0-20 : Very weak - almost certainly blocked
The minimum quality threshold (default 60) is the gatekeeper. Only signals scoring above this value can trigger trades.
Dynamic Threshold Adjustment:
The system optionally adjusts the threshold based on historical signal distribution:
If Dynamic Threshold enabled:
Recent_MMD_Mean = SMA(MMD, 50)
Recent_MMD_StdDev = StdDev(MMD, 50)
Dynamic_Threshold = max(Base_Threshold ร 0.5,
min(Base_Threshold ร 2.0,
MMD_Mean + MMD_StdDev ร 0.5))
This auto-calibrates to market conditions:
โข Quiet markets (low MMD): Threshold loosens (0.5ร base)
โข Active markets (high MMD): Threshold tightens (2ร base)
Signal Ranking Filter:
When enabled, the system tracks the last 100 signal quality scores and only fires signals in the top percentile.
If Ranking Percentile = 75%:
โข Collect last 100 signal scores in memory
โข Sort ascending
โข Threshold = Score at 75th percentile position
โข Only signals โฅ this threshold fire
This ensures you're only taking the cream of the crop โtop 25% of signals by quality, not every signal that technically qualifies.
๐ฆ SIGNAL GENERATION: TRANSITION LOGIC & COOLDOWNS
The confluence system determines if a signal qualifies , but the signal generation logic controls when triangles appear on the chart.
Core Qualification:
For a LONG signal to qualify:
1. Bull quality score โฅ signal threshold (default 60)
2. Selected arm signals +1 (long)
3. Cooldown satisfied (bars since last signal โฅ cooldown period)
4. Drawdown protection OK (current drawdown < pause threshold)
5. MMD โฅ 80% of dynamic threshold (slight buffer below full threshold)
For a SHORT signal to qualify:
1. Bear quality score โฅ signal threshold
2. Selected arm signals -1 (short)
3-5. Same as long
But qualification alone doesn't trigger a chart signal.
Three Signal Modes:
1. RESPONSIVE (Default - Recommended):
Signals appear on:
โข Fresh qualification (wasn't qualified last bar, now is)
โข Direction reversal (was qualified short, now qualified long)
โข Quality improvement (already qualified, quality jumps 25%+ during EXTREME regime)
This mode shows new opportunities and significant upgrades without cluttering the chart with repeat signals.
2. TRANSITION ONLY:
Signals appear on:
โข Fresh qualification only
โข Direction reversal only
This is the cleanest mode - signals only when first qualifying or when flipping direction. Misses re-entries if quality improves mid-regime.
3. CONTINUOUS:
Signals appear on:
โข Every bar that qualifies
Testing/debugging mode - shows all qualified bars. Very noisy but useful for understanding when system wants to trade.
Cooldown System:
Prevents signal clustering and overtrading by enforcing minimum bars between signals.
Base Cooldown: User-defined (default 5 bars)
Adaptive Cooldown (Optional):
If enabled, cooldown scales with volatility:
Effective_Cooldown = Base_Cooldown ร volatility_multiplier
Where:
ATR_Pct = ATR(14) / Close ร 100
Volatility_Multiplier = max(0.5, min(3.0, ATR_Pct / 2.0))
โข Low volatility (ATR 1%): Multiplier ~0.5ร โ Cooldown = 2-3 bars (tight)
โข Medium volatility (ATR 2%): Multiplier 1.0ร โ Cooldown = 5 bars (normal)
โข High volatility (ATR 4%+): Multiplier 2.0-3.0ร โ Cooldown = 10-15 bars (wide)
This prevents excessive trading during wild swings while allowing more signals during calm periods.
Regime Filter:
Three modes controlling which regimes allow trading:
OFF: Trade in any regime (STABLE, TRENDING, SHIFTING, ELEVATED, EXTREME)
SMART (Recommended):
โข Regime score = 1.0 for SHIFTING, ELEVATED (optimal)
โข Regime score = 0.8 for TRENDING (acceptable)
โข Regime score = 0.5 for EXTREME (too chaotic)
โข Regime score = 0.2 for STABLE (too quiet)
Quality scores are multiplied by regime score. A 70% quality signal in STABLE regime becomes 70% ร 0.2 = 14% โ blocked.
STRICT:
โข Regime score = 1.0 for SHIFTING, ELEVATED only
โข Regime score = 0.0 for all others โ hard block
Only trades during optimal distribution shift regimes.
Drawdown Protection:
If current equity drawdown exceeds pause threshold (default 8%), all signals are blocked until equity recovers.
This circuit breaker prevents compounding losses during adverse conditions or broken market structure.
๐ฏ RISK MANAGEMENT: ATR-BASED STOPS & TARGETS
Every signal generates volatility-normalized stop loss and target levels displayed as boxes on the chart.
Stop Loss Calculation:
Stop_Distance = ATR(14) ร ATR_Multiplier (default 1.5)
For LONG: Stop = Entry - Stop_Distance
For SHORT: Stop = Entry + Stop_Distance
The stop is placed 1.5 ATRs away from entry by default, adapting automatically to instrument volatility.
Target Calculation:
Target_Distance = Stop_Distance ร Risk_Reward_Ratio (default 2.0)
For LONG: Target = Entry + Target_Distance
For SHORT: Target = Entry - Target_Distance
Default 2:1 risk/reward means target is twice as far as stop.
Example:
โข Price: $100
โข ATR: $2
โข ATR Multiplier: 1.5
โข Risk/Reward: 2.0
LONG Signal:
โข Entry: $100
โข Stop: $100 - ($2 ร 1.5) = $97.00 (-$3 risk)
โข Target: $100 + ($3 ร 2.0) = $106.00 (+$6 reward)
โข Risk/Reward: $3 risk for $6 reward = 1:2 ratio
Target/Stop Box Lifecycle:
Boxes persist for a lifetime (default 20 bars) OR until an opposite signal fires, whichever comes first. This provides visual reference for active trade levels without permanent chart clutter.
When a new opposite-direction signal appears, all existing boxes from the previous direction are immediately deleted, ensuring only relevant levels remain visible.
Adaptive Stop/Target Sizing:
While not explicitly coded in the current version, the shadow portfolio tracking system calculates PnL based on these levels. Users can observe which ATR multipliers and risk/reward ratios produce optimal results for their instrument/timeframe via the dashboard performance metrics.
๐ COMPREHENSIVE VISUAL SYSTEM
KMD provides rich visual feedback through four distinct layers:
1. PROBABILITY CLOUD (Adaptive Volatility Bands):
Two sets of bands around price that expand/contract with MMD:
Calculation:
Std_Multiplier = 1 + MMD ร 3
Upper_1ฯ = Close + ATR ร Std_Multiplier ร 0.5
Lower_1ฯ = Close - ATR ร Std_Multiplier ร 0.5
Upper_2ฯ = Close + ATR ร Std_Multiplier
Lower_2ฯ = Close - ATR ร Std_Multiplier
โข Inner band (ยฑ0.5ร adjusted ATR) : 68% probability zone (1 standard deviation equivalent)
โข Outer band (ยฑ1.0ร adjusted ATR) : 95% probability zone (2 standard deviation equivalent)
When MMD spikes, bands widen dramatically, showing increased uncertainty. When MMD calms, bands tighten, showing normal price action.
2. MOMENTUM FLOW VECTORS (Directional Arrows):
Dynamic arrows that visualize momentum strength and direction:
Arrow Properties:
โข Length: Proportional to momentum magnitude (2-10 bars forward)
โข Width: 1px (weak), 2px (medium), 3px (strong)
โข Transparency: 30-100 (more opaque = stronger momentum)
โข Direction: Up for bullish, down for bearish
โข Placement: Below bars (bulls) or above bars (bears)
Trigger Logic:
โข Always appears every 5 bars (regular sampling)
โข Forced appearance if momentum strength > 50 OR regime shift OR MMD velocity > 10%
Strong momentum (>75%) gets:
โข Secondary support arrow (70% length, lighter color)
โข Label showing "75%" strength
Very strong momentum (>60%) gets:
โข Gradient flow lines (thick vertical lines showing momentum vector)
This creates a dynamic "flow field" showing where market pressure is pushing price.
3. REGIME ZONES (Distribution Shift Highlighting):
Boxes drawn around price action during periods when MMD > threshold:
Zone Detection:
โข System enters "in_regime" mode when MMD crosses above threshold
โข Tracks highest high and lowest low during regime
โข Exits "in_regime" when MMD crosses back below threshold
โข Draws box from regime_start to current bar, spanning high to low
Zone Colors:
โข EXTREME regime: Red with 90% transparency (dangerous)
โข SHIFTING regime: Amber with 92% transparency (active)
โข Other regimes: Teal with 95% transparency (normal)
Emphasis Boxes:
When regime_shift occurs (MMD crosses above threshold that bar), a special 4-bar wide emphasis box highlights the exact transition moment with thicker borders and lower transparency.
This visual immediately shows "the market just changed" moments.
4. SIGNAL CONNECTION LINES:
Lines connecting consecutive signals to show trade sequences:
Line Types:
โข Solid line : Same direction signals (long โ long, short โ short)
โข Dotted line : Reversal signals (long โ short or short โ long)
Visual Purpose:
โข Identify signal clusters (multiple entries same direction)
โข Spot reversal patterns (system changing bias)
โข See average bars between signals
โข Understand system behavior patterns
Connections are limited to signals within 100 bars of each other to avoid across-chart lines.
๐ COMPREHENSIVE DASHBOARD: REAL-TIME SYSTEM STATE
The dashboard provides complete transparency into system internals with three size modes:
MINIMAL MODE:
โข Header (Regime + WFO phase)
โข Signal Status (LONG READY / SHORT READY / WAITING)
โข Core metrics only
COMPACT MODE (Default):
โข Everything in Minimal
โข Kernel info
โข Active bandit arm + validation
โข WFO efficiency
โข Confluence scores (bull/bear)
โข MMD current value
โข Position status (if active)
โข Performance summary
FULL MODE:
โข Everything in Compact
โข Signal Quality Diagnostics:
- Bull quality score vs threshold with progress bar
- Bear quality score vs threshold with progress bar
- MMD threshold check (โ/โ)
- MMD percentile (top X% of history)
- Regime fit score (how well current regime suits trading)
- WFO confidence level (validation strength)
- Adaptive cooldown status (bars remaining vs required)
โข All Arms Signals:
- Shows all 7 arm signals (โฒ/โผ/โ)
- Q-value for each arm
- Indicates selected arm with โ
โข Thompson Sampling Parameters (if TS mode):
- Alpha/Beta values for selected arm
- Probability estimate (ฮฑ/(ฮฑ+ฮฒ))
โข Extended Performance:
- Expectancy per trade
- Sharpe ratio with star rating
- Individual arm performance (if enough data)
Key Dashboard Sections:
REGIME: Current market regime (STABLE/TRENDING/SHIFTING/ELEVATED/EXTREME) with color-coded background
SIGNAL STATUS:
โข "โฒ LONG READY" (cyan) - Long signal qualified
โข "โผ SHORT READY" (red) - Short signal qualified
โข "โ WAITING" (gray) - No qualified signals
โข Signal Mode displayed (Responsive/Transition/Continuous)
KERNEL:
โข Active kernel type (RBF/Laplacian/Cauchy/Rational Quadratic)
โข Current bandwidth (effective after adaptation)
โข Adaptive vs Fixed indicator
โข RBF scale (if RBF) or RQ alpha (if RQ)
BANDIT:
โข Selection algorithm (UCB1/UCB1-Tuned/Epsilon/Thompson)
โข Active arm name (MMD Shift, Trend, Breakout, etc.)
โข Validation status (โ if validated, ? if unproven)
โข Pull count (n=XXX) - how many times selected
โข Q-Value (ร10000 for readability)
โข UCB score (exploration + exploitation)
โข Train Q vs Test Q comparison
โข Test trade count
WFO:
โข Current period number
โข Progress through period (XX%)
โข Efficiency percentage (color-coded: green >80%, yellow 50-80%, red <50%)
โข Overfit risk assessment (LOW/MODERATE/HIGH)
โข Validated arms count (X/7)
CONFLUENCE:
โข Bull score (X/7) with progress bar (โโโ full, โโ medium, โ low, โ none)
โข Bear score (X/7) with progress bar
โข Color-coded: Green/red if โฅ minimum, gray if below
MMD:
โข Current value (3 decimals)
โข Threshold (2 decimals)
โข Ratio (MMD/Threshold ร multiplier, e.g. "1.5x" = 50% above threshold)
โข Velocity (+/- percentage change) with up/down arrows
POSITION:
โข Status: LONG/SHORT/FLAT
โข Active indicator (โ if active, โ if flat)
โข Bars since entry
โข Current P&L percentage (if active)
โข P&L direction (โฒ profit / โผ loss)
โข R-Multiple (how many Rs: PnL / initial_risk)
PERFORMANCE:
โข Total Trades
โข Wins (green) / Losses (red) breakdown
โข Win Rate % with visual bar and color coding
โข Profit Factor (PF) with checkmark if >1.0
โข Expectancy % (average profit per trade)
โข Sharpe Ratio with star rating (โ
โ
โ
>2, โ
โ
>1, โ
>0, โ negative)
โข Max DD % (maximum drawdown) with "Now: X%" showing current drawdown
๐ง KEY PARAMETERS EXPLAINED
Kernel Configuration:
โข Kernel Function : RBF / Laplacian / Cauchy / Rational Quadratic
- Start with Cauchy for stability, experiment with others
โข Bandwidth (ฯ) (0.5-10.0, default 2.0): Kernel sensitivity
- Lower: More signals, more false positives (scalping: 0.8-1.5)
- Medium: Balanced (swing: 1.5-3.0)
- Higher: Fewer signals, stronger quality (position: 3.0-8.0)
โข Adaptive Bandwidth (default ON): Auto-adjust to volatility
- Keep ON for most markets
โข RBF Scale (0.1-2.0, default 0.5): RBF-specific scaling
- Only matters if RBF kernel selected
- Lower = more sensitive (0.3 for scalping)
- Higher = less sensitive (1.0+ for position)
โข RQ Alpha (0.5-5.0, default 2.0): Rational Quadratic tail behavior
- Only matters if RQ kernel selected
- Low (0.5-1.0): Heavy tails, robust to outliers (like Cauchy)
- High (3.0-5.0): Light tails, sensitive (like RBF)
Analysis Windows:
โข Reference Period (30-500, default 100): Historical baseline
- Scalping: 50-80
- Intraday: 80-150
- Swing: 100-200
- Position: 200-500
โข Test Period (5-100, default 20): Recent behavior window
- Should be 15-25% of Reference Period
- Scalping: 10-15
- Intraday: 15-25
- Swing: 20-40
- Position: 30-60
โข Sample Size (10-40, default 20): Data points for MMD
- Lower: Faster, less reliable (scalping: 12-15)
- Medium: Balanced (standard: 18-25)
- Higher: Slower, more reliable (position: 25-35)
Walk-Forward Optimization:
โข Enable WFO (default ON): Master overfitting protection
- Always ON for live trading
โข Training Window (100-2000, default 500): Learning data
- Should be 4-6ร Testing Window
- 1m-5m: 300-500
- 15m-1h: 500-800
- 4h-1D: 500-1000
- 1D-1W: 800-2000
โข Testing Window (50-500, default 100): Validation data
- Should be 1/5 to 1/4 of Training
- 1m-5m: 50-100
- 15m-1h: 80-150
- 4h-1D: 100-200
- 1D-1W: 150-500
โข Min Trades for Validation (5-50, default 10): Statistical threshold
- Active traders: 8-12
- Position traders: 15-30
โข Performance Decay (0.8-0.99, default 0.95): Old data forgetting
- Aggressive: 0.85-0.90 (volatile markets)
- Moderate: 0.92-0.96 (most use cases)
- Conservative: 0.97-0.99 (stable markets)
Multi-Armed Bandit:
โข Learning Rate (ฮฑ) (0.01-0.3, default 0.08): Adaptation speed
- Low: 0.01-0.05 (position trading, stable)
- Medium: 0.06-0.12 (day/swing trading)
- High: 0.15-0.30 (scalping, fast adaptation)
โข Selection Strategy : UCB1 / UCB1-Tuned / Epsilon-Greedy / Thompson
- UCB1 recommended for most (proven, reliable)
- Thompson for advanced users (best empirical performance)
โข Exploration Constant (c) (0.5-3.0, default 1.5): Explore vs exploit
- Low: 0.5-1.0 (conservative, proven strategies)
- Medium: 1.2-1.8 (balanced)
- High: 2.0-3.0 (experimental, volatile markets)
โข Epsilon (0.0-0.3, default 0.10): Random exploration (ฮต-greedy only)
- Only applies if Epsilon-Greedy selected
- Standard: 0.10 (10% random)
Signal Configuration:
โข MMD Threshold (0.05-1.0, default 0.15): Distribution divergence trigger
- Low: 0.08-0.12 (scalping, sensitive)
- Medium: 0.12-0.20 (day/swing)
- High: 0.25-0.50 (position, strong signals)
- Stocks/indices: 0.12-0.18
- Forex: 0.15-0.25
- Crypto: 0.20-0.35
โข Confluence Filter (default ON): Multi-factor requirement
- Keep ON for quality signals
โข Minimum Confluence (1-7, default 2): Factors needed
- Very low: 1 (high frequency)
- Low: 2-3 (active trading)
- Medium: 4-5 (swing)
- High: 6-7 (rare perfect setups)
โข Cooldown (1-20, default 5): Bars between signals
- Short: 1-3 (scalping, allows rapid re-entry)
- Medium: 4-7 (day/swing)
- Long: 8-20 (position, ensures development)
โข Signal Mode : Responsive / Transition Only / Continuous
- Responsive: Recommended (new + upgrades)
- Transition: Cleanest (first + reversals)
- Continuous: Testing (every qualified bar)
Advanced Signal Control:
โข Minimum Signal Strength (30-90, default 60): Quality floor
- Lower: More signals (scalping: 40-50)
- Medium: Balanced (standard: 55-65)
- Higher: Fewer signals (position: 70-80)
โข Dynamic MMD Threshold (default ON): Auto-calibration
- Keep ON for adaptive behavior
โข Signal Ranking Filter (default ON): Top percentile only
- Keep ON to trade only best signals
โข Ranking Percentile (50-95, default 75): Selectivity
- 75 = top 25% of signals
- 85 = top 15% of signals
- 90 = top 10% of signals
โข Adaptive Cooldown (default ON): Volatility-scaled spacing
- Keep ON for intelligent spacing
โข Regime Filter : Off / Smart / Strict
- Off: Any regime (maximize frequency)
- Smart: Avoid extremes (recommended)
- Strict: Only optimal regimes (maximum quality)
Risk Parameters:
โข Risk:Reward Ratio (1.0-5.0, default 2.0): Target distance multiplier
- Conservative: 1.0-1.5 (higher WR needed)
- Balanced: 2.0-2.5 (standard professional)
- Aggressive: 3.0-5.0 (lower WR acceptable)
โข Stop Loss (ATR mult) (0.5-4.0, default 1.5): Stop distance
- Tight: 0.5-1.0 (scalping, low vol)
- Medium: 1.2-2.0 (day/swing)
- Wide: 2.5-4.0 (position, high vol)
โข Pause After Drawdown (2-20%, default 8%): Circuit breaker
- Aggressive: 3-6% (small accounts)
- Moderate: 6-10% (most traders)
- Relaxed: 10-15% (large accounts)
Multi-Timeframe:
โข MTF Confirmation (default OFF): Higher TF filter
- Turn ON for swing/position trading
- Keep OFF for scalping/day trading
โข Higher Timeframe (default "60"): HTF for trend check
- Should be 3-5ร chart timeframe
- 1m chart โ 5m or 15m
- 5m chart โ 15m or 60m
- 15m chart โ 60m or 240m
- 1h chart โ 240m or D
Display:
โข Probability Cloud (default ON): Volatility bands
โข Momentum Flow Vectors (default ON): Directional arrows
โข Regime Zones (default ON): Distribution shift boxes
โข Signal Connections (default ON): Lines between signals
โข Dashboard (default ON): Stats table
โข Dashboard Position : Top Left / Top Right / Bottom Left / Bottom Right
โข Dashboard Size : Minimal / Compact / Full
โข Color Scheme : Default / Monochrome / Warm / Cool
โข Show MMD Debug Plot (default OFF): Overlay MMD value
- Turn ON temporarily for threshold calibration
๐ PROFESSIONAL USAGE PROTOCOL
Phase 1: Parameter Calibration (Week 1)
Goal: Find optimal kernel and bandwidth for your instrument/timeframe
Setup:
โข Enable "Show MMD Debug Plot"
โข Start with Cauchy kernel, 2.0 bandwidth
โข Run on chart with 500+ bars of history
Actions:
โข Watch yellow MMD line vs red threshold line
โข Count threshold crossings per 100 bars
โข Adjust bandwidth to achieve desired signal frequency:
- Too many crossings (>20): Increase bandwidth (2.5-3.5)
- Too few crossings (<5): Decrease bandwidth (1.2-1.8)
โข Try other kernels to see sensitivity differences
โข Note: RBF most sensitive, Cauchy most robust
Target: 8-12 threshold crossings per 100 bars for day trading
Phase 2: WFO Validation (Weeks 2-3)
Goal: Verify strategies generalize out-of-sample
Requirements:
โข Enable WFO with default settings (500/100)
โข Let system run through 2-3 complete WFO cycles
โข Accumulate 50+ total trades
Actions:
โข Monitor WFO Efficiency in dashboard
โข Check which arms validate (green โ) vs unproven (yellow ?)
โข Review Train Q vs Test Q for selected arm
โข If efficiency < 0.5: System overfitting, adjust parameters
Red Flags:
โข Efficiency consistently <0.4: Serious overfitting
โข Zero arms validate after 2 cycles: Windows too short or thresholds too strict
โข Selected arm never validates: Investigate arm logic relevance
Phase 3: Signal Quality Tuning (Week 4)
Goal: Optimize confluence and quality thresholds
Requirements:
โข Switch dashboard to FULL mode
โข Enable all diagnostic displays
โข Track signals for 100+ bars
Actions:
โข Watch Bull/Bear quality scores in real-time
โข Note quality distribution of fired signals (are they all 60-70% or higher?)
โข If signal ranking on, check percentile cutoff appropriateness
โข Adjust "Minimum Signal Strength" to filter weak setups
โข Adjust "Minimum Confluence" if too many/few signals
Optimization:
โข If win rate >60%: Lower thresholds (capture more opportunities)
โข If win rate <45%: Raise thresholds (improve quality)
โข If Profit Factor <1.2: Increase minimum quality by 5-10 points
Phase 4: Regime Awareness (Week 5)
Goal: Understand which regimes work best
Setup:
โข Track performance by regime using notes/journal
โข Dashboard shows current regime constantly
Actions:
โข Note signal quality and outcomes in each regime:
- STABLE: Often weak signals, low confidence
- TRENDING: Trend-following arms dominate
- SHIFTING: Highest signal quality, core opportunity
- ELEVATED: Good signals, moderate success
- EXTREME: Mixed results, high variance
โข Adjust Regime Filter based on findings
โข If losing in EXTREME consistently: Use "Smart" or "Strict" filter
Phase 5: Micro Live Testing (Weeks 6-8)
Goal: Validate forward performance with minimal capital
Requirements:
โข Paper trading shows: WR >45%, PF >1.2, Efficiency >0.6
โข Understand why signals fire and why they're blocked
โข Comfortable with dashboard interpretation
Setup:
โข 10-25% intended position size
โข Focus on ML-boosted signals (if any pattern emerges)
โข Keep detailed journal with screenshots
Actions:
โข Execute every signal the system generates (within reason)
โข Compare your P&L to shadow portfolio metrics
โข Track divergence between your results and system expectations
โข Review weekly: What worked? What failed? Any execution issues?
Red Flags:
โข Your WR >20% below paper: Execution problems (slippage, timing)
โข Your WR >20% above paper: Lucky streak or parameter mismatch
โข Dashboard metrics drift significantly: Market regime changed
Phase 6: Full Scale Deployment (Month 3+)
Goal: Progressively increase to full position sizing
Requirements:
โข 30+ micro live trades completed
โข Live WR within 15% of paper WR
โข Profit Factor >1.0 live
โข Max DD <15% live
โข Confidence in parameter stability
Progression:
โข Months 3-4: 25-50% intended size
โข Months 5-6: 50-75% intended size
โข Month 7+: 75-100% intended size
Maintenance:
โข Weekly dashboard review for metric drift
โข Monthly WFO efficiency check (should stay >0.5)
โข Quarterly parameter re-optimization if market character shifts
โข Annual deep review of arm performance and kernel relevance
Stop/Reduce Rules:
โข WR drops >20% from baseline: Reduce to 50%, investigate
โข Consecutive losses >12: Reduce to 25%, review parameters
โข Drawdown >20%: Stop trading, reassess system fit
โข WFO efficiency <0.3 for 2+ periods: System broken, retune completely
๐ก DEVELOPMENT INSIGHTS & KEY BREAKTHROUGHS
The Kernel Discovery:
Early versions used simple moving average crossovers and momentum indicatorsโthey captured obvious moves but missed subtle regime changes. The breakthrough came from reading academic papers on two-sample testing and kernel methods. Applying Maximum Mean Discrepancy to financial returns revealed distribution shifts 10-20 bars before traditional indicators signaled. This edgeโknowing the market had fundamentally changed before it was obviousโbecame the core of KMD.
Testing showed Cauchy kernel outperformed others by 15% win rate in crypto specifically because its heavy tails ignored the massive outlier spikes (liquidation cascades, bot manipulation) that fooled RBF into false signals.
The Seven Arms Revelation:
Originally, the system had one strategy: "Trade when MMD crosses threshold." Performance was inconsistentโgreat in ranging markets, terrible in trends. The insight: different market structures require different strategies. Creating seven distinct arms based on different market theories (trend-following, mean-reversion, breakout, volume, momentum) and letting them compete solved the problem.
The multi-armed bandit wasn't added as a gimmickโit was the solution to "which strategy should I use right now?" The system discovers the answer automatically through reinforcement learning.
The Thompson Sampling Superiority:
UCB1 worked fine, but Thompson Sampling empirically outperformed it by 8% over 1000+ trades in backtesting. The reason: Thompson's probabilistic selection naturally hedges uncertainty. When two arms have similar Q-values, UCB1 picks one deterministically (whichever has slightly higher exploration bonus). Thompson samples from both distributions, sometimes picking the "worse" oneโand often discovering it's actually better in current conditions.
Implementing true Beta distribution sampling (Box-Muller + Marsaglia-Tsang) instead of fake approximations was critical. Fake Thompson (using random with bias) underperformed UCB1. Real Thompson with proper Bayesian updating dominated.
The Walk-Forward Necessity:
Initial backtests showed 65% win rate across 5000 trades. Live trading: 38% win rate over first 100 trades. Crushing disappointment. The problem: overfitting. The training data included the test data (look-ahead bias). Implementing proper walk-forward optimization with out-of-sample validation dropped backtest win rate to 51%โbut live performance matched at 49%. That's a system you can trust.
WFO efficiency metric became the North Star. If efficiency >0.7, live results track paper. If efficiency <0.5, prepare for disappointment.
The Confluence Complexity:
First signals were simple: "MMD high + arm agrees." This generated 200+ signals on 1000 bars with 42% win rateโnot tradeable. Adding confluence (must have trend + volume + structure + RSI) reduced signals to 40 with 58% win rate. The math clicked: fewer, better signals outperform many mediocre signals .
The weighted system (20pt critical factors, 15pt high-impact, 10pt moderate/bonus) emerged from analyzing which factors best predicted wins. Bandit arm alignment and MMD quality were 2-3ร more predictive than RSI or divergence, so they got 2ร the weight. This isn't arbitraryโit's data-driven.
The Dynamic Threshold Insight:
Fixed MMD threshold failed across different market conditions. 0.15 worked perfectly on ES but fired constantly on Bitcoin. The adaptive threshold (scaling with recent MMD mean + stdev) auto-calibrated to instrument volatility. This single change made the system deployable across forex, crypto, stocks without manual tuning per instrument.
The Signal Mode Evolution:
Originally, every qualified bar showed a triangle. Charts became unusableโdozens of stacked triangles during trending regimes. "Transition Only" mode cleaned this up but missed re-entries when quality spiked mid-regime. "Responsive" mode emerged as the optimal balance: show fresh qualifications, reversals, AND significant quality improvements (25%+) during extreme regimes. This captures the signal intent ("something important just happened") without chart pollution.
๐จ LIMITATIONS & CRITICAL ASSUMPTIONS
What This System IS NOT:
โข NOT Predictive : KMD doesn't forecast prices. It identifies when the current distribution differs from historical baseline, suggesting regime transitionโbut not direction or magnitude.
โข NOT Holy Grail : Typical performance is 48-56% win rate with 1.3-1.8 avg R-multiple. This is a probabilistic edge, not certainty. Expect losing streaks of 8-12 trades.
โข NOT Universal : Performs best on liquid, auction-driven markets (futures, major forex, large-cap stocks, BTC/ETH). Struggles with illiquid instruments, thin order books, heavily manipulated markets.
โข NOT Hands-Off : Requires monitoring for news events, earnings, central bank announcements. MMD cannot detect "Fed meeting in 2 hours" or "CEO stepping down"โit only sees statistical patterns.
โข NOT Immune to Regime Persistence : WFO helps but cannot predict black swans or fundamental market structure changes (pandemic, war, regulatory overhaul). During these events, all historical patterns may break.
Core Assumptions:
1. Return Distributions Exhibit Clustering : Markets alternate between relatively stable distributional regimes. Violation: Permanent random walk, no regime structure.
2. Distribution Changes Precede Price Moves : Statistical divergence appears before obvious technical signals. Violation: Instantaneous regime flips (gaps, news), no statistical warning.
3. Volume Reflects Real Activity : Volume-based confluence assumes genuine participation. Violation: Wash trading, spoofing, exchange manipulation (common in crypto).
4. Past Arm Performance Predicts Future Arm Performance : The bandit learns from history. Violation: Fundamental strategy regime change (e.g., market transitions from mean-reverting to trending permanently).
5. ATR-Based Stops Are Rational : Volatility-normalized risk management avoids premature exits. Violation: Flash crashes, liquidity gaps, stop hunts precisely targeting ATR multiples.
6. Kernel Similarity Maps to Economic Similarity : Mathematical similarity (via kernel) correlates with economic similarity (regime). Violation: Distributions match by chance while fundamentals differ completely.
Performs Best On:
โข ES, NQ, RTY (S&P 500, Nasdaq, Russell 2000 futures)
โข Major forex pairs: EUR/USD, GBP/USD, USD/JPY, AUD/USD
โข Liquid commodities: CL (crude oil), GC (gold), SI (silver)
โข Large-cap stocks: AAPL, MSFT, GOOGL, TSLA (>$10M avg daily volume)
โข Major crypto on reputable exchanges: BTC, ETH (Coinbase, Kraken)
Performs Poorly On:
โข Low-volume stocks (<$1M daily volume)
โข Exotic forex pairs with erratic spreads
โข Illiquid crypto altcoins (manipulation, unreliable volume)
โข Pre-market/after-hours (thin liquidity, gaps)
โข Instruments with frequent corporate actions (splits, dividends)
โข Markets with persistent one-sided intervention (central bank pegs)
Known Weaknesses:
โข Lag During Instantaneous Shifts : MMD requires (test_window) bars to detect regime change. Fast-moving events (5-10 bar crashes) may bypass detection entirely.
โข False Positives in Choppy Consolidation : Low-volatility range-bound markets can trigger false MMD spikes from random noise crossing threshold. Regime filter helps but doesn't eliminate.
โข Parameter Sensitivity : Small bandwidth changes (2.0โ2.5) can alter signal frequency by 30-50%. Requires careful calibration per instrument.
โข Bandit Convergence Time : MAB needs 50-100 trades per arm to reliably learn Q-values. Early trades (first 200 bars) are essentially random exploration.
โข WFO Warmup Drag : First WFO cycle has no validation data, so all arms start unvalidated. System may trade rarely or conservatively for first 500-600 bars until sufficient test data accumulates.
โข Visual Overload : With all display options enabled (cloud, vectors, zones, connections), chart can become cluttered. Disable selectively for cleaner view.
โ ๏ธ RISK DISCLOSURE
Trading futures, forex, stocks, options, and cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Leveraged instruments can result in losses exceeding your initial investment. Past performance, whether backtested or live, is not indicative of future results.
The Kernel Market Dynamics system, including its multi-armed bandit and walk-forward optimization components, is provided for educational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any security or instrument.
The adaptive learning algorithms optimize based on historical dataโthere is no guarantee that learned strategies will remain profitable or that kernel-detected regime changes will lead to profitable trades. Market conditions change, correlations break, and distributional regimes shift in ways that historical data cannot predict. Black swan events occur.
Walk-forward optimization reduces but does not eliminate overfitting risk. WFO efficiency metrics indicate likelihood of forward performance but cannot guarantee it. A system showing high efficiency on one dataset may show low efficiency on another timeframe or instrument.
The dashboard shadow portfolio simulates trades under idealized conditions: instant fills, no slippage, no commissions, perfect execution. Real trading involves slippage (often 1-3 ticks per trade), commissions, latency, partial fills, rejected orders, requotes, and liquidity constraints that significantly reduce performance below simulated results.
Maximum Mean Discrepancy is a statistical distance metricโhigh MMD indicates distribution divergence but does not indicate direction, magnitude, duration, or profitability of subsequent moves. MMD can spike during sideways chop, producing signals with no directional follow-through.
Users must independently validate system performance on their specific instruments, timeframes, broker execution, and market conditions before risking capital. Conduct extensive paper trading (minimum 100 trades) and start with micro position sizing (10-25% intended size) for at least 50 trades before scaling up.
Never risk more capital than you can afford to lose completely. Use proper position sizing (1-2% risk per trade maximum). Implement stop losses on every trade. Maintain adequate margin/capital reserves. Understand that most retail traders lose money. Algorithmic systems do not change this fundamental realityโthey systematize decision-making but do not eliminate risk.
The developer makes no warranties regarding profitability, suitability, accuracy, reliability, or fitness for any particular purpose. Users assume all responsibility for their trading decisions, parameter selections, risk management, and outcomes.
By using this indicator, you acknowledge that you have read and understood these risk disclosures and accept full responsibility for all trading activity and potential losses.
๐ SUGGESTED TRADINGVIEW CATEGORIES
PRIMARY CATEGORY: Statistics
The Kernel Market Dynamics system is fundamentally a statistical learning framework . At its core lies Maximum Mean Discrepancyโan advanced two-sample statistical test from the academic machine learning literature. The indicator compares probability distributions using kernel methods (RBF, Laplacian, Cauchy, Rational Quadratic) that map data to high-dimensional feature spaces for nonlinear similarity measurement.
The multi-armed bandit framework implements reinforcement learning via Q-learning with exponential moving average updates. Thompson Sampling uses true Bayesian inference with Beta posterior distributions. Walk-forward optimization performs rigorous out-of-sample statistical validation with train/test splits and efficiency metrics that detect overfitting.
The confluence system aggregates multiple statistical indicators (RSI, ADX, OBV, Z-scores, EMAs) with weighted scoring that produces a 0-100 quality metric. Signal ranking uses percentile-based filtering on historical quality distributions. The dashboard displays comprehensive statistics: win rates, profit factors, Sharpe ratios, expectancy, drawdownsโall computed from trade return distributions.
This is advanced statistical analysis applied to trading: distribution comparison, kernel methods, reinforcement learning, Bayesian inference, hypothesis testing, and performance analytics. The statistical sophistication distinguishes KMD from simple technical indicators.
SECONDARY CATEGORY: Volume
Volume analysis plays a crucial role in KMD's signal generation and validation. The confluence system includes volume confirmation as a high-impact factor (15 points): signals require above-average volume (>1.2ร mean) for full points, with scaling based on volume ratio. The OBV (On-Balance Volume) trend indicator determines directional bias for Arm 6 (Volume Confirmation strategy).
Volume ratio (current / 20-period average) directly affects confluence scoresโhigher volume strengthens signal quality. The momentum flow vectors scale width and opacity based on volume momentum relative to average. Energy particle visualization specifically marks volume burst events (>2ร average volume) as potential market-moving catalysts.
Several bandit arms explicitly incorporate volume:
โข Arm 2 (Breakout): Requires volume confirmation for Bollinger Band breaks
โข Arm 6 (Volume Confirmation): Primary logic based on OBV trend + volume spike
The system recognizes volume as the "conviction" behind price movesโdistribution changes matter more when accompanied by significant volume, indicating genuine participant behavior rather than noise. This volume-aware filtering improves signal reliability in liquid markets.
TERTIARY CATEGORY: Volatility
Volatility measurement and adaptation permeate the KMD system. ATR (Average True Range) forms the basis for all risk management: stops are placed at ATR ร multiplier, targets are scaled accordingly. The adaptive bandwidth feature scales kernel bandwidth (0.5-2.0ร) inversely with volatilityโtightening during calm markets, widening during volatile periods.
The probability cloud (primary visual element) directly visualizes volatility: bands expand/contract based on (1 + MMD ร 3) multiplier applied to ATR. Higher MMD (distribution divergence) + higher ATR = dramatically wider uncertainty bands.
Adaptive cooldown scales minimum bars between signals based on ATR percentage: higher volatility = longer cooldown (up to 3ร base), preventing overtrading during whipsaw conditions. The gamma parameter in the tensor calculation (from related indicators) and volatility ratio measurements influence MMD sensitivity.
Regime classification incorporates volatility metrics: high volatility with ranging price action produces "RANGEโก" regime, while volatility expansion with directional movement produces trending regimes. The system adapts its behavior to volatility regimesโtighter requirements during extreme volatility, looser requirements during stable periods.
ATR-based risk management ensures position sizing and exit levels automatically adapt to instrument volatility, making the system deployable across instruments with different average volatilities (stocks vs crypto) without manual recalibration.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CLOSING STATEMENT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Kernel Market Dynamics doesn't just measure priceโit measures the probability structure underlying price. It doesn't just pick one strategyโit learns which strategies work in which conditions. It doesn't just optimize on historyโit validates on the future.
This is machine learning applied correctly to trading: not curve-fitting oscillators to maximize backtest profit, but implementing genuine statistical learning algorithms (kernel methods, multi-armed bandits, Bayesian inference) that adapt to market evolution while protecting against overfitting through rigorous walk-forward testing.
The seven arms compete. The Thompson sampler selects. The kernel measures. The confluence scores. The walk-forward validates. The signals fire.
Most indicators tell you what happened. KMD tells you when the game changed.
"In the space between distributions, where the kernel measures divergence and the bandit learns from consequenceโthere, edge exists." โ KMD-WFO-MAB v2
Taking you to school. โ Dskyz, Trade with insight. Trade with anticipation.
The Strat Lite [rdjxyz]โ OVERVIEW
The Strat Lite is a stripped down version of the Strat Assistant indicator by rickyzcarrollโfocusing on visual simplicity and script performance. If you're new to The Strat, you may prefer the Strat Assistant as a learning aid.
โ FEATURES REMOVED FROM THE ORIGINAL SCRIPT
Candle Numbering & Up/Down Arrows
Previous Week High & Low Lines
Previous Day High & Low Lines
Action Wick Percentage
Actionable Signals Plot
Strat Combo Plots
Extensive Alerts
โ FEATURES KEPT FROM THE ORIGINAL SCRIPT
Full Timeframe Continuity
Candle Coloring
โ FEATURES ADDED TO THE ORIGINAL SCRIPT
Failed 2 Down Classification
Failed 2 Up Classification
โ DETAILS
The Strat is a trading methodology developed by Rob Smith that offers an objective approach to trading by focusing on the 3 universal scenarios regarding candle behavior:
SCENARIO ONE
The 1 Bar - Inside Bar: A candle that doesn't take out the highs or the lows of the previous candle; aka consolidation.
These are shown as gray candles by default.
SCENARIO TWO
The 2 Bar - Directional Bar: A candle that takes out one side of the previous candle; aka trending (or at least attempting to trend).
SCENARIO THREE
The 3 Bar - Outside Bar: A candle that takes out both sides of the previous candle; aka broadening formation.
In addition to Rob's 3 universal scenarios, this indicator identifies two variations of 2 bars:
Failed 2 up: A candle that takes out the high of the previous candle but closes bearish.
Failed 2 down: A candle that takes out the low of the previous candle but closes bullish.
โ SETTINGS
โ INPUTS
FTC (FULL TIMEFRAME CONTINUITY)
Show/hide FTC plots
Offset FTC plots from current bar
โ STYLE
STRAT COLORS
Color 0 (Failed 2 Up) - Default is fuchsia
Color 1 (Failed 2 Down) - Default is teal
Color 2 (Inside 1) - Default is gray
Color 3 (Outside 3) - Default is dark purple
Color 4 (2 up) - Default is aqua
Color 5 (2 down) - Default is white
โ USAGE
It's recommended to use The Strat Lite with a top down analysis so you can find lower timeframe positions with higher timeframe context.
โ TOP DOWN ANALYSIS
MONTHLY LEVELS
Starting on a monthly chart, the previous month's high and low are manually plotted.
WEEKLY LEVELS
Dropping down to a weekly chart, the previous week's high and low are manually plotted.
DAILY LEVELS
Dropping down to a daily chart, the previous day's high and low are manually plotted.
12H LEVELS
Dropping down to a 12h chart, the previous 12h's high and low are manually plotted.
ANALYSIS
The monthly low was broken, creating a lower low (aka a broadening formation), signalling potential exhaustion risk, which can be a catalyst for reversals. The daily candle that tested the monthly low closed as a Failed 2 Downโpotentially an early sign of a reversal. With these 2 confluences, it's reasonable to expect the next daily candle to be a 2 Up. Now it's time to look for a lower timeframe entry.
โ LOWER TIMEFRAME POSITION
HOURLY PRICE ACTION
Dropping down to an hourly chart, we're anticipating a 2 Up on the daily timeframe, so we're looking for a bullish pattern to enter a position long. I personally like the 6:00 AM UTC-5 hourly candle, as it's the midpoint of the day (for futures).
In this specific example, we see the opening gap was filled and there's a potential 2-1-2 bullish reversal set up.
At this point, price can either do one of 5 things:
Form another 1 (inside) candle
Form a 2 up (directional) candle
Form a 2 down (directional) candle
Form a 2 up, fail, and potentially flip to form a bearish 3 (outside) candle
Form a 2 down, fail, and potentially flip to form a bullish 3 (outside) candle
Knowing the finite potential outcomes helps us set up our positions, manage them accordingly, and flip bias if needed.
POSITION SETUP
Here we can set up a position long AND short. To go long, we set a buy stop at the 1h high and stop loss just below the 50% level of the inside candle; to go short, we set a sell stop at 1h low and stop loss just above the 50% level of the inside candle.
If the short gets triggered first, we can wait for price to move in our favor before cancelling the buy order. If the short becomes a failed 2 down, potentially reversing to become a bullish 3, we can either wait for the stop loss to trigger and for the long position to trigger OR we can move the buy stop to our short stop loss and move the long stop loss to the low of the 1h candle.
POSITION REFINEMENT
For an even tighter risk-to-reward, we can drop to a lower timeframe and look for setups that would be an early trigger of the 1h entry. Just know, the lower you go the more noise there isโincreasing risk of getting stopped out before the 1h trigger.
Above are 30m refined entries.
In this example, the long buy stop was triggered. It closed bullish, so the sell stop order can be cancelled.
โ TARGETS & POSITION MANAGEMENT
TARGETS
These depend on whether you intend to scalp, day trade, or swing trade, but targets are typically the highs of previous candles (when bullish) and lows of previous candles (when bearish). It's advised to be cautious of swing pivots as there's a risk of exhaustion and reversal at these levels.
In this example, the nearest target was the previous 12h high and the next target was the previous day high; if you're a swing trader, you could target previous week's high and previous month's high.
POSITION MANAGEMENT
This largely depends on your risk tolerance, but it's common to either:
Move stop loss slightly into profit
Trail stop loss behind higher highs (bullish) or lower lows (bearish)
Scale out of positions at potential pivot points, leaving a runner
Scale into positions on pullbacks on the way to target
โ WRAP UP
As demonstrated, The Strat Lite offers a stripped down version of the Strat Assistantโmaking it visually simple for more experienced Strat traders. By following a top-down approach with The Strat methodology, you can find high probability setups and manage risk with relative ease.
โ DISCLAIMER
This indicator is a tool for visual analysis and is intended to assist traders who follow The Strat methodology. As with any trading methodology, there's no guarantee of profits; trading involves a high degree of risk and you could lose all of your invested capital. The example shown is of past performance and is not indicative of future results and does not constitute and should not be construed as investment advice. All trading decisions and investments made by you are at your own discretion and risk. Under no circumstances shall the author be liable for any direct, indirect, or incidental damages. You should only risk capital you can afford to lose.
Fib and Slope Trend Detector [EWT] + MTF Dashboard๐ Overview
The Momentum Structure Trend Detector is a sophisticated trend-following tool that combines Price Velocity (Slope) with Market Structure (Fibonacci) to identify high-probability trend reversals and continuations.
Unlike traditional indicators that rely heavily on lagging moving averages, this script analyzes the speed of price action in real-time. It operates on the core principle of market structure: Impulse moves are fast and steep, while corrections are slow and shallow.
๐ง The Logic: Physics Meets Market Structure
This indicator determines the trend direction by calculating the Slope (Velocity) of price swings.
ZigZag Calculation: It first identifies market swings (Highs and Lows) using a standard pivot detection algorithm.
Slope Calculation: It calculates the velocity of every completed leg using the formula: $Slope = \frac{|Price Change|}{|Time Duration|}$.
Trend Definition:
Uptrend : If the previous Up-move was fast (Impulse) and the subsequent Down-move is slower (Correction), the market is primed for an uptrend.
Downtrend : If the previous Down-move was fast (Impulse) and the subsequent Up-move is slower (Correction), the market is primed for a downtrend.
๐ฅ Key Features
1. Aggressive Real-Time Detection (No Lag)
Most structure indicators wait for a "Higher High" to confirm a trend, which often leads to late entries. This script uses an Aggressive Live Slope calculation:
It compares the current developing slope of the live price action against the slope of the previous completed leg.
Result: As soon as the current move becomes "steeper" (faster) than the previous correction, the trend flips immediately. This allows you to catch the "meat" of the move before a new pivot is even confirmed.
2. Fibonacci Validity Filter
Momentum alone isn't enough; we need structural integrity.
The script calculates the 78.6% Retracement level of the impulse leg.
If a correction moves deeper than this Fibonacci limit (on a closing basis), the trend structure is considered "broken" or "invalid," and the indicator switches to a Neutral state. This filters out choppy/ranging markets.
3. Multi-Timeframe (MTF) Dashboard
A customizable dashboard on the chart allows for fractal analysis. You can view the trend state (UP/DOWN/NEUTRAL) across 9 different timeframes (1m to 1M) simultaneously.
Green Row : Uptrend
Red Row : Downtrend
Gray : Neutral/Indeterminate
4. Smart Visuals
Background Colo r: Changes dynamically (Teal for Bullish, Red for Bearish, Gray for Neutral) to give you an instant read of the market state.
Slope Labels : Displays the calculated numeric slope on the chart, helping you visualize the momentum difference between impulse and corrective waves.
Invalidation Levels : Automatically plots the invalidation line (Stop Loss level) based on the market structure.
๐ ๏ธ Settings & Inputs
Strategy Settings
Pivot Deviation Length : Sensitivity of the ZigZag calculation (Default: 5). Lower numbers = more sensitive to small swings.
Max Retracement % : The Fibonacci limit for a valid correction (Default: 78.6%).
Min Bars for Live Calc : To prevent noise, the script waits for this many bars after a pivot before calculating the "Live Slope" (Default: 3).
Dashboard Settings
Show Dashboard : Toggle the table on/off.
Timeframe Toggles : Enable/Disable specific timeframes (1m, 5m, 15m, 30m, 1H, 4H, 1D, 1W, 1M) to suit your trading style.
๐ฏ How to Use
Wait for Background Change : When the background turns Teal, it indicates that a corrective pullback has ended and a new impulse with high velocity has begun.
Check Invalidation : Look at the plotted Stop Loss Level. If price closes below this line, the trade idea is invalid.
Confirm with Dashboard : Use the table to ensure the higher timeframes (e.g., 1H, 4H) align with your current chart's direction for higher probability setups.
Disclaimer : This tool is designed for trend analysis and educational purposes. Past performance (momentum) is not indicative of future results. Always manage your risk.
GTI BGTI: RSI Suite (Standard โข Stochastic โข Smoothed)
A three-layer momentum and trend toolkit that combines Standard RSI, Stochastic RSI, and a Smoothed/โMacroโ RSI to help you read intraday swings, trend transitions, and high-probability reversal/continuation spots.
All in one pane with intuitive coloring and optional divergence markers and alerts.
Why this works
* Stochastic RSI (K/D) visualizes fast momentum swings and timing.
* Standard RSI moves more gradually, helping confirm trend transitions that may span several Stochastic cycles.
* Smoothed RSI (Average โ Macro) adds a second-pass filter and slope persistence to reveal the macro direction while suppressing noise.
Used together, Stochastic guides entries/exits around local highs/lows, while the RSI layers improve confidence when a small swing is likely part of a larger turn.
What youโll see
* Standard RSI (yellow; pink above Bull line, aqua below Bear line).
* Stochastic RSI (K/D) with contextual colors:
* Greens when RSI is weak/oversold (bearish conditions โ watch for bullish reversals/continuations).
* Reds when RSI is strong/overbought (bullish conditions โ watch for bearish reversals/continuations).
* Smoothed (Macro) RSI with trend color:
* Red when macro is ascending (bullish),
* Aqua when macro is descending (bearish).
* Divergences (optional markers):
* Bearish: RSI Lower High + Price Higher High (red โฌ).
* Bullish: RSI Higher Low + Price Lower Low (green โฌ).
* No repaint: pivots confirm after the chosen right-bars window.
How to use it
* Bullish Reversal
* Macro RSI is reversing at a higher low after price has been in a overall downtrend
* Stochastic RSI is switching from green to red in an overall downtrend
* Bullish Oversold
* Macro RSI is reversing from a significantly low level after price has a short but strong dip during an overall uptrend
* Stochastic RSI is switching from green to red in an overall uptrend
* Bullish Continuation
* Macro RSI is ascending with a strong slope or forming a higher low above the 50 line
* Stochastic RSI is reaching a bottom but still painted red
* Bearish Reversal
* Macro RSI is reversing at a lower high after price has been in a overall uptrend
* Stochastic RSI is switching from red to green in an overall uptrend
* Bearish Overbought
* Macro RSI is reversing from a significantly high level after price has a short but strong jump during an overall downtrend
* Stochastic RSI is switching from red to green in an overall downtrend
* Bearish Continuation
* Macro RSI is descending with a strong slope or forming a lower high below the 50 line
* Stochastic RSI is reaching a top but still painted green
* Divergences: Use as signals of exhaustionโbest when aligned with Macro RSI color/slope and key levels (e.g., Bull/Bear lines, 50 midline).
*** IMPORTANT ***
* Stack confluence, donโt single-signal trade. Look for:
* 1) Macro RSI color & slope (red = ascending/bullish, aqua = descending/bearish)
* 2) Standard RSI location (above/below Bull/Bear lines or 50)
* 3) Stoch flip + direction
* 4) Price structure (HH/HL vs LH/LL)
* 5) Divergence type (regular vs hidden) at meaningful levels
* Trade with the macro
* Prioritize longs when Macro RSI is red or just flipped up
* Prioritize shorts when Macro RSI is aqua or just flipped down
* Counter-trend setups = smaller size and faster management.
* Location > signal
* The same crossover/divergence is higher quality near Bull (~60)/Bear(~40) or extremes than in the mid-range chop around 50.
* Early vs confirmed
* Use the early pivot heads-up for anticipation, but scale in only after the confirmed pivot (right-bars complete). If early signal fails to confirm, stand down.
* Define invalidation upfront
* For divergence entries, place stops beyond the pivot extreme (LL/HH). If Macro RSI flips against your trade or RSI breaks back through 50 with slope, exit or tighten.
* Multi-timeframe alignment
* Best results come when entry timeframe (e.g., 1H) aligns with higher-TF macro (e.g., 4H/D). If they disagree, treat it as mean-reversion only.
* Avoid common traps
* Skip: isolated Stochastic flips without RSI support, divergences without price HH/LL confirmation, and serial divergences when Macro RSI slope is strong against the idea.
* Parameter guidance
* Start with defaults; then tune: confirmBars 3โ7, minSlope 0.05โ0.15 RSI pts/bar, pivot left/right tighter for faster but noisier signals, wider for cleaner but fewer.
* Alerts = workflow, not auto-trades
* Use Macro Flip + Divergence alerts as a checklist trigger; enter only when your confluence rules are met and risk is defined.
Key inputs (tweak to your market/timeframe)
* RSI / Stochastic lengths and K/D smoothing.
* Bull / Bear Lines (default 61.1 / 43.6).
* Average RSI Method/Length (SMA/EMA/RMA/WMA) + Macro Smooth Length.
* Trend confirmation: bars of persistence and minimum slope to reduce flip noise.
* Pivot look-back (left/right) for divergence confirmation strictness.
Alerts included
* Macro Flip Up / Down (Smoothed RSI regime change).
* RSI Bullish/Bearish Divergence (confirmed at pivot).
* Stochastic RSI continuation/divergence (optional).
Tips
* Level + Slope matter. High/low RSI level flags conditions; slope confirms impulse/continuation.
* Let Stochastic time the swing; let Macro RSI filter the trend.
* Tighten or loosen pivot windows to trade fewer/cleaner vs. more/faster signals.
Universal Direction EstimatorUniversal Direction Estimator V1
Overview
The Universal Direction Estimator V1 is a Pine Script v6 indicator that unifies Trend, Momentum, and Market-Structure readings into a single normalized score ranging from โ1 to +1. It can optionally reference a higher timeframe (HTF) for confirmation and apply a custom Wilder-style ADX confidence boost to highlight conditions where directional bias is statistically stronger.
Itโs designed as an interpretable directional meter โ providing a quick visual estimate of whether short-term forces favor upward, downward, or neutral movement.
How It Works
The model produces three independent sub-scores each normalized to the โ1 to +1 range:
โข Trend Component (EMA-Spread): Measures distance between a fast and slow EMA, scaled by ATR and passed through a smooth tanh function to stabilize extremes.
โข Momentum Component (ROC): Captures short-term velocity using rate-of-change over a configurable window.
โข Structure Component (Market Structure): Detects new highs or lows within a rolling bar window and otherwise uses the deviation of price from a mid-SMA to express bias.
A weighted blend (default = 45 % Trend / 35 % Momentum / 20 % Structure) forms the base score.
Optional modules then refine it:
โข HTF Alignment Bonus: When both local and higher-timeframe direction share the same sign, the score receives a small positive adjustment; disagreement slightly reduces confidence.
โขย ADX Confidence Boost: A self-contained Wilder-style +DI / โDI / DX calculation raises the scoreโs magnitude when measured trend strength exceeds a user threshold.
โข The final bounded result determines one of three discrete states:
UP (score > 0.10), DOWN (score < โ0.10), or NEUTRAL (inside the dead-zone).
Visual and Functional Features
โข Candle Coloring: Optional shading of bars by current directional state.
โข Direction Trail : A smoothed overlay of the score for visual continuity.
โข Flip Markers: Up/Down triangles plotted when the estimator changes state.
โข S tatus Table: Compact on-chart panel listing Direction, Score %, individual component weights, ADX value, and HTF alignment flag.
โข Alerts: Built-in conditions trigger โDirection Flip: UPโ / โDirection Flip: DOWN.โ
Why Itโs Original
Rather than relying on a single legacy indicator, this tool fuses three orthogonal measures into a unified confidence-weighted direction index, with both adaptive normalization and a bespoke ADX engine that avoids ta.adx(). The method produces a consistent โ1 to +1 score applicable across instruments and timeframes, suitable for comparative scanning or overlay visualization.
Itโs not a clone of classic moving-average or momentum systems; its novelty lies in the weighted, bounded integration and multi-timeframe coherence adjustment that makes directional interpretation more stable and portable between markets.
Configuration & Usage Notes
โข Timeframes: Enter a higher-TF (e.g., 60, 240, D) and enable Use HTF Confirmation to activate cross-timeframe logic.
โข Lengths & Weights: Adjust EMA, ROC, and Structure lookbacks and their blend ratios to tune sensitivity.
โข Confidence Filter: Modify ADX length and threshold to emphasize stronger trends.
โข Visual Controls: Toggle candle colors, trail line, arrows, and status table to fit your chart layout.
This estimator can be paired with other analytical overlays (volume, volatility, structure) for study purposes, but it is not designed to issue automated trade entries or exits.
Legal Disclaimer
This indicator is for charting and educational use only and does not constitute financial advice, trading signals, or performance claims. Markets involve risk, including the loss of principal. Past performance does not guarantee future results. Use at your own discretion and consult a qualified professional before making financial decisions. Provided โas is,โ without warranties
Symmetry Break Index | QRSymmetry Break Trend Scanner | QuantumResearch
What it does
This indicator detects trend regime shifts by measuring how persistently price deviates from its moving-average โsymmetry.โ It outputs a continuous Score and a binary Signal (Bullish / Bearish) when that score crosses user-defined thresholds:
Bullish (Long) when upside deviations dominate โ sustained uptrend bias
Bearish (Short/Cash) when downside deviations dominate โ sustained downtrend bias
Itโs built for clarity and consistency: the plot is a single score with two horizontal decision lines so traders can quickly identify regime changes on a clean chart.
How it works (principle, not code)
Normalize price vs trend: Price is standardized against a moving average and its standard deviation to create a dimensionless โoscillatorโ series (how far above/below typical behavior price sits).
Symmetry count: For a user-defined range of reference levels, the script counts whether the standardized price is above or below each level. This builds a cumulative symmetry score: positive when upside presence is broad and persistent, negative when downside dominates.
Regime thresholds: Crossing the Uptrend Threshold or Downtrend Threshold flips the quantum state to Bullish or Bearish, minimizing noise compared with a single-level trigger.
This approach emphasizes persistence and breadth of deviation rather than one-off spikes, which can help filter chop.
Plots & visuals
Score (histogram/area fill): Positive area fills in the bullish color, negative area in the bearish color.
Zero line: Quick reference for balance between up/down deviations.
Two decision lines: Uptrend Threshold and Downtrend Threshold to mark regime flips.
Bar colors: Bars tint with the active regime (Bullish / Bearish) for fast reads.
Publish with a clean chart so the score and thresholds are clearly visible. Avoid extra indicators unless they are required and explained.
Inputs & customization
MA Length (default 40): Window for the baseline moving average and volatility. Shorter = more reactive; longer = smoother.
Source: Price input (e.g., close).
For Loop Range (Start / End, default โ200โฆ200): Breadth of reference levels in the symmetry count. Wider range = stronger smoothing and slower flips.
Uptrend / Downtrend Thresholds: Regime triggers. Tighten to react faster, widen to reduce whipsaws.
Color Mode: Choose a palette to match your chart.
Tip: Start with defaults, then tune MA Length and thresholds for your market/timeframe.
How to use it
Trend confirmation: Trade in the direction of the active regime; avoid counter-trend setups when the score is far beyond a threshold.
Risk controls: When the score retreats toward zero, consider reducing size or tightening stopsโmomentum is weakening.
Confluence: Combine with structure (S/R), volume, or volatility bands for entries/exits; the score provides context, not entries alone.
Originality & value
Unlike single-threshold oscillators, this method aggregates many standardized comparisons into one score, rewarding persistence and breadth of deviation. The result is a robust regime signal that tends to filter fleeting wiggles and highlight true symmetry breaks.
Limitations
Extremely range-bound markets can still produce false flips if thresholds are too tight.
Sudden volatility regime changes may require re-tuning MA Length or thresholds.
Standardization depends on the chosen window; there is no โone size fits all.โ
Disclaimer
This tool is for research/education and is not financial advice. Markets involve risk, including loss of capital. Past performance does not predict or guarantee future results. Always test settings on your timeframe and use prudent risk management.
ZZ RangeHappy Trading!
This is a real-time range detection indicator. Based on previous supply and demand levels, it classifies each new bar as Up, Down, or Range.
New supply and demand levels are typically detected within two bars. The indicator can be used as a filter and supports indicator-on-indicator functionality.
Intro
Concept
Usage and Settings Menu
Declaration for TradingView House Rules on Script Publishing
Disclaimer
1. Concept
Based on a variation of the Bilson-Gann Algorithm, this indicator calculates local supply and demand levels and determines whether the current price is:
Between those levels โ Ranging
Above โ Uptrending
Below โ Downtrending
Less significant supply and demand levels are filtered out using a user-adjustable intensity setting.
2. Usage and Settings Menu
There are four settings available:
Indicator Timeframe โ Display results from higher timeframes on the lower timeframe chart.
Range Detection Rule โ Choose whether a bar must be fully inside supply and demand zones to be considered ranging, or if touching the zone is sufficient.
Bar Structure Basis โ Select whether wicks or bodies of bars are used to calculate supply and demand levels.
Rule to set S&D โ Choose among three rules defining how often new supply and demand levels are calculated. Each rule adjusts the sensitivity and responsiveness of detection.
Alert Signals Available:
Trend Signal 1 = Uptrend, 0 = Ranging, -1 = Downtrend
last supply Level
last demand Level
3. Declaration for TradingView House Rules on Script Publishing
The unique feature of ZZ Range is its real-time range detection capability.
This script is closed-source and invite-only, to support and compensate for months of development work.
4. Disclaimer
Trading involves risk, and losses can and do occur. This script is intended for informational and educational purposes only. All examples are hypothetical and not financial advice.
Decisions to buy, sell, hold, or trade securities, commodities, or other assets should be based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Use this script at your own risk. It may contain bugs, and I cannot be held responsible for any financial losses resulting from its use.
Cheers!
FVG Zones with Signalsโ OVERVIEW
"FVG Zones with Signals" is a technical analysis tool that identifies Fair Value Gaps (FVG) on the chart and draws customizable zones in the form of boxes. It is ideal for traders using price action and market structure strategies, helping to identify potential imbalance zones and trading opportunities based on breakout and exit signals. With flexible size filter settings, box styles, and signal options, the indicator ensures clarity and precision on the chart.
โ CONCEPTS
The indicator is designed to identify potential entry points for trades based on FVG breakouts or retests. For chart clarity, a size filter for FVGs is included, based on a multiplier of the average candle size over a specified period.
Why are FVGs important? FVG zones represent areas of market imbalance, often attracting price back to "fill" the gap. Larger gaps (with a higher size multiplier) have a greater chance of being retested, as they indicate deeper imbalancesโleaving more unexecuted orders in those zones, which attracts liquidity. Market makers and institutions often return to these levels to "refresh" liquidity before further moves. However, not every large FVG is retested quicklyโin strong trends, smaller imbalances may be ignored, and the location (e.g., near swing highs/lows) is critical for retest probability.
โ FEATURES
- FVG Detection: Identifies bullish and bearish FVGs based on size filters (Candle Size Period and FVG Size Multiplier), with automatic initialization of historical gaps up to 500 candles back.
- Customizable Boxes: Draws FVG boxes with adjustable border colors, background gradients, border styles (solid, dashed, dotted), border widths, and transparency for both the background and the 50% FVG midline.
- Breakout and Exit Signals: Generates "Break" signals (green upward triangle for breakouts above bearish FVG, red downward triangle for breakouts below bullish FVG) and "Exit" signals (circles for exiting the zone), with options to select signal types (Break, Exit, or Both). A break signal causes the box to disappear, leaving a triangle as a trace of the breakout, which may serve as a signal to open a position. Exit signals (circles) may also indicate entry opportunities but require additional confirmation, such as alignment with the main trend.
- Midline: Automatically draws a dashed line at the 50% FVG level with adjustable transparency, aiding in assessing price reactions within the zone.
- Box Limitation: Automatically removes old or inactive FVGs after 500 candles to avoid chart clutter.
- Alerts: Built-in alerts for all signal types, including price and FVG type descriptions.
โ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
- FVG Settings: Adjust Candle Size Period (default 20) and FVG Size Multiplier (default 1) to filter out small gapsโhigher values generate fewer but more significant FVGs.
- Box Settings: Configure colors and styles for bullish (green) and bearish (red) boxes, including background transparency (default 80) and midline transparency.
- Signal Settings: Select signal types (Break, Exit, or Both) in Signal Type. Breakout signals appear after a candle closes outside the zone, while exit signals appear when exiting an FVG without a full breakout.
- Styling: Customize signal colors (green for buy/up, red for sell/down) and shape sizes.
Interpreting Signals:
- Break Up Signal: A green triangle below the bar indicates a breakout above a bearish FVG, suggesting potential continuation of an uptrend.
- Break Down Signal: A red triangle above the bar indicates a breakout below a bullish FVG, suggesting potential continuation of a downtrend.
- Exit Up/Down Signal: A green/red circle indicates an exit from an FVG without a full breakout, which may signal the end of a correction or preparation for a reversal.
- FVG Zones: If the price returns to an FVG and fills the gap, it may indicate equilibrium; an unfilled gap often leads to a retest.
- Use signals in conjunction with other technical analysis tools for confirmation, such as RSI (to identify overbought/oversold conditions) or MACD (to confirm momentum). Analyze FVGs from higher timeframesโthese zones act as stronger imbalance levels and carry greater structural significance.
Exit signals (retests without breakouts) tend to be most effective when traded in line with the current trend.
โ APPLICATIONS
- Price Action Trading: Use FVG zones as dynamic support and resistance levels. In an uptrend, look for buying opportunities in bullish FVGs, where price often tests the gap before continuing. Combining with RSI, MACD, or Fibonacci levels enhances the significance of zones.
- Breakout Strategies: Trade based on breakout signals from FVGs. A buy signal after breaking a bearish FVG may indicate a strong upward impulse, especially when supported by a rising MACD or RSI exiting oversold conditions.
Larger FVG gaps (higher multiplier) have a greater chance of retest, as they indicate deeper imbalances.
โ NOTES
- Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize size filters for your trading style.
- The indicator initializes historical FVGs up to 500 candles back, which may slow loading on longer charts.
- For best results, use on high-liquidity markets where FVGs are more frequently retested.
- In consolidation zones, the indicator may generate more false signals, so additional confirmation is recommended.
Cumulative Volume DeltaCumulative Volume Delta (CVD) Indicator
This indicator is a modification of the Trading View CVD indicator. Cumulative Volume Delta (CVD), which represents the net difference between up volume (volume traded as the price increases) and down volume (volume traded as the price decreases) over a chosen Anchor Period.
The data for the CVD calculation is requested using the built-in ta.requestVolumeDelta function from a lower timeframe to approximate the directional volume with greater precision. This lower timeframe is either automatically selected based on the chart's timeframe or can be customized by the user.
Key Features and Inputs
Anchor Period: Defines the period over which the volume delta is accumulated and plotted. The default is "1D" (Daily), but it can be changed to any higher timeframe (e.g., "1W" for Weekly) to analyze CVD across different cycles.
CVD Candle Plot: The calculated volume delta values are plotted as a custom candle, where:
The open and close of the CVD candle represent the volume delta at the start and end of the anchor period, respectively.
The high and low represent the maximum and minimum volume delta reached during that period.
Up/Down Coloring Logic: The color of the CVD candle is determined by the directional movement of the price during the anchor period, allowing traders to quickly correlate volume delta with price action. Users can select between two methods via the "Strong Up/Down Coloring" input:
Strong Up/Down (Default): The candle is colored bullish (Teal) if the current price closes above the previous bar's high or bearish (Red) if it closes below the previous bar's low. This logic highlights significant momentum.
Regular Up/Down: The candle is colored bullish (Teal) if the close is greater than the open (price moved up) or bearish (Red) if the close is less than the open (price moved down).
Lower Timeframe Selection: This determines the resolution of the up and down volume components.
By default, the script automatically selects an appropriate lower timeframe (e.g., "1" minute for intraday charts, "5" minutes for daily charts) to balance historical data availability with calculation precision.
An option is provided to customize this "Lower Timeframe" for advanced users seeking higher or lower resolution.
The CVD indicator is a powerful tool for analyzing order flow dynamics and assessing the genuine strength of price movements by comparing the aggregate buying pressure (up volume) against the selling pressure (down volume).
Technical Notes (Code Details)
Language: Pine Scriptยฎ //@version=6.
Function: Utilizes the ta.requestVolumeDelta() function with a user-defined anchorInput (default "1D") and a determined lowerTimeframe to retrieve the relevant delta data: .
Error Handling: Includes a check to confirm the symbol provides volume data, preventing runtime errors.
Phantom Trend IndicatorOverview
The Phantom Trend Indicator (PTI) is a streamlined tool for identifying trend direction and strength. It blends zigzag-based trend detection with a volume profile to display a histogram showing price distance from the Point of Control (POC). Six distinct colors highlight trend states, with background highlights for extreme price zones. Ideal for stocks, forex, crypto, and futures across any timeframe.
Features:
Trend Detection: Uses zigzag fractals to identify uptrends and downtrends.
Histogram Colors: Six colors for trend strength (low, high, extreme for up/down trends) or neutral (gray).
Dynamic Levels: Plots POC, Value Area Low (VAL), and High (VAH) via volume profile.
Background Colors: Highlights overbought (above VAH) or oversold (below VAL) zones.
Alerts: Signals new trends.
How It Works:
Trends: Zigzag fractals define trend ranges, with price position setting histogram colors (low, high, or extreme).
Histogram: Shows price deviation from POC.
Background: Colors extreme zones outside VAL/VAH.
This indicator builds on traditional trend detectors and volume profiles by integrating them into a single, cohesive tool. Unlike standard momentum indicators that rely on moving averages, PTI uses zigzag fractals for more responsive trend identification, reducing lag in volatile markets. Compared to basic volume profile scripts, it adds trend-based color coding and background alerts for extremes, providing clearer visual cues for overbought/oversold conditions. The six distinct colors indicate trend strength, and customizable thresholds allow fine-tuning for different assets and timeframes, enhancing adaptability. Traders benefit from combined momentum and liquidity insights, helping spot reversals or continuations more reliablyโmaking PTI a valuable, standalone addition for both novice and experienced users.
Settings
Trend Detector: Toggle alerts, adjust zigzag sensitivity, and set thresholds for low-to-high and extreme color transitions.
Dynamic Levels: Configure volume profile period, multiplier, accuracy, value area percent, and ATR-based channel width.
Visuals: Customize POC, VAL, VAH, and area fill colors.
Read Histogram: Uptrend colors show early, strong, or overextended moves; downtrend colors indicate early, weakening, or oversold conditions; gray for consolidation.
Background: Monitor for overbought/oversold color-coded signals.
Tune: Adjust zigzag or period settings for your timeframe/asset.
Tips
Shorten period for intraday, extend for swing trading.
Pair with other indicators for confirmation.
Notes:
Requires sufficient chart data for volume profile.
Test settings for low-volatility assets.
For informational use only, not financial advice. Test thoroughly, and happy trading!
Multiple Colored Moving AveragesMULTIPLE COLORED MOVING AVERAGES - USER GUIDE
DISCLAIMER
----------
Both the code and this documentation were created heavily using artificial intelligence. I'm lazy...
This indicator was inspired by repo32's "Moving Average Colored EMA/SMA" indicator. *
What is this indicator?
-----------------------
This is a TradingView indicator that displays up to 4 different moving averages on your chart simultaneously. Each moving average can be customized with different calculation methods, colors, and filtering options.
Why would I use multiple moving averages?
-----------------------------------------
- See trend direction across different timeframes at once
- Identify support and resistance levels
- Spot crossover signals between fast and slow MAs
- Reduce false signals with filtering options
- Compare how different MA types react to price action
What moving average types are available?
----------------------------------------
11 different types:
- SMA: Simple average, equal weight to all periods
- EMA: Exponential, more weight to recent prices
- WMA: Weighted, linear weighting toward recent data
- RMA: Running average, smooth like EMA
- DEMA: Double exponential, reduced lag
- TEMA: Triple exponential, even less lag
- HMA: Hull, fast and smooth combination
- VWMA: Volume weighted, includes volume data
- LSMA: Least squares, based on linear regression
- TMA: Triangular, double-smoothed
- ZLEMA: Zero lag exponential, compensated for lag
How do I set up the indicator?
------------------------------
Each MA has these settings:
- Enable/Disable: Turn each MA on or off
- Type: Choose from the 11 calculation methods
- Length: Number of periods (21, 50, 100, 200 are common)
- Smoothing: 0-10 levels of extra smoothing
- Noise Filter: 0-5% to ignore small changes
- Colors: Bullish (rising) and bearish (falling) colors
- Line Width: 1-5 pixels thickness
What does the smoothing feature do?
-----------------------------------
Smoothing applies extra calculations to make the moving average line smoother. Higher levels reduce noise but make the MA respond slower to price changes. Use higher smoothing in choppy markets, lower smoothing in trending markets.
What is the noise filter?
--------------------------
The noise filter ignores small percentage changes in the moving average. For example, a 0.3% filter will ignore any MA movement smaller than 0.3%. This helps eliminate false signals from minor price fluctuations.
When should I use this indicator?
---------------------------------
- Trend analysis: See if market is going up, down, or sideways
- Entry timing: Look for price bounces off MA levels
- Exit signals: Watch for MA slope changes or crossovers
- Support/resistance: MAs often act as dynamic levels
- Multi-timeframe analysis: Use different lengths for different perspectives
What are some good settings to start with?
-------------------------------------------
Conservative approach:
- MA 1: EMA 21 (short-term trend)
- MA 2: SMA 50 (medium-term trend)
- MA 3: SMA 200 (long-term trend)
- Low noise filtering (0.1-0.3%)
Active trading:
- MA 1: HMA 9 (very responsive)
- MA 2: EMA 21 (short-term)
- MA 3: EMA 50 (medium-term)
- Minimal or no smoothing
How do I interpret the colors?
------------------------------
Each MA changes color based on its direction:
- Bullish color: MA is rising (upward trend)
- Bearish color: MA is falling (downward trend)
- Gray: MA is flat or unchanged
What should I look for in crossovers?
-------------------------------------
- Golden Cross: Fast MA crosses above slow MA (bullish signal)
- Death Cross: Fast MA crosses below slow MA (bearish signal)
- Multiple crossovers in same direction can confirm trend changes
- Wait for clear separation between MAs after crossover
How do I use MAs for support and resistance?
---------------------------------------------
- In uptrends: MAs often provide support when price pulls back
- In downtrends: MAs may act as resistance on rallies
- Multiple MAs create support/resistance zones
- Stronger levels where multiple MAs cluster together
Can I use this with other indicators?
-------------------------------------
Yes, it works well with:
- Volume indicators for confirmation
- RSI or MACD for timing entries
- Bollinger Bands for volatility context
- Price action patterns for setup confirmation
What if I get too many signals?
-------------------------------
- Increase smoothing levels
- Raise noise filter percentages
- Use longer MA periods
- Focus on major crossovers only
- Wait for multiple MA confirmation
What if signals are too slow?
-----------------------------
- Reduce smoothing to 0
- Lower noise filter values
- Switch to faster MA types (HMA, ZLEMA, DEMA)
- Use shorter periods
- Focus on the fastest MA only
Which MA types work best in different markets?
----------------------------------------------
Trending markets: EMA, DEMA, TEMA (responsive to trends)
Choppy markets: SMA, TMA, HMA with smoothing (less whipsaws)
High volatility: Use higher smoothing and noise filtering
Low volatility: Use minimal filtering for better responsiveness
Do I need all the advanced features?
------------------------------------
No. Start with basic settings:
- Choose MA type and length
- Set colors you prefer
- Leave smoothing at 0
- Leave noise filter at 0
Add complexity only if needed to improve signal quality.
How do I know if my settings are working?
-----------------------------------------
- Backtest on historical data
- Paper trade the signals first
- Adjust based on market conditions
- Keep a trading journal to track performance
- Be willing to modify settings as markets change
Can I save different configurations?
------------------------------------
Yes, save different indicator templates in TradingView for:
- Different trading styles (scalping, swing trading)
- Different market conditions (trending, ranging)
- Different instruments (stocks, forex, crypto)
Session Volatility MonitorOverview
Session Volatility Monitor is a versatile volatility indicator tailored for intraday and session-based trading. It computes the average maximum price deviation (either up or down) from the session's opening price over a user-specified number of prior days, providing insights into expected "room to move" in the current session. This helps traders gauge potential exhaustion points, set realistic targets or stops, and identify when a directional move has reached historical norms (flagged as "REACHED" with the exact price level).
Displayed via a customisable table and optional horizontal target lines, it's ideal for markets like forex, crypto, futures, or stocks where session volatility matters. The indicator supports custom sessions with timezone adjustments, making it adaptable to global trading hours (e.g., London, NY, or Asia kill zones). For assets with small tick sizes (e.g., forex pairs at 0.0001), a multiplier scales values for readability (e.g., showing pips as 67.0 instead of 0.00670).
Key Features
Session-Based Calculations:
Defines sessions via presets (e.g., "NY Kill Zone: 07:00-10:00") or custom HHMM-HHMM inputs. (please note that preset sessions are mainly for futures e.g. "Full Day18:01-17:00", but also can be useful for forex and crypto)
Adjustable UTC offset (e.g., -5 for ET) to align with your asset's timezoneโensures accurate detection regardless of TradingView's UTC internal clock.
Tracks the max one-sided move (high - open or open - low) per session, averaging over 1โN previous days (default: 14).
Table Display:
Avg Max Move: Historical average deviation, labeled with days averaged and session time.
Current Move: Real-time displacement from session open (positive for up, negative for down).
Room to Go Up/Down: Remaining distance to reach the average, updating live; appends "REACHED (price)" if hit during the session.
Customisable: Text color, font size (tiny to huge), position (e.g., bottom_left), and value scaling via multiplier/decimal places.
Target Lines:
Optional horizontal lines at "Up Target" (open + avg move) and "Down Target" (open - avg move).
Lines start at the session open bar and extend only through the session duration (e.g., stops at 12:00 for a 07:00-12:00 session)โno further projection post-session.
Fully customisable: Toggle on/off, color, style (solid/dotted/dashed), width, label text/background.
Display Adjustments for Forex/Crypto:
Multiplier: Scales raw values (e.g., set to 10000 for EURUSD to show pips like 45.0 instead of 0.0045).
Decimals: Controls precision (0โ5 places) for table values.
How to Use
Add to Chart: Search for "Session Volatility Monitor" in TradingView's indicators and apply to your symbol (e.g., EURUSD for forex, NQ1! for futures, BTCUSD for crypto).
Configure Settings:
Select a session preset or custom range; adjust UTC offset if needed (e.g., +0 for UTC symbols like crypto).
Set "Number of Previous Days to Average" (e.g., 14 for a two-week look back).
For small-tick assets, set Multiplier (e.g., 100 for crypto points, 10000 for forex pips) and Decimals (e.g., 0 for whole numbers).
Customise table position/size/color and target lines for visibility.
Interpret Outputs:
Monitor the table for "room to go"โif Room Up is low/negative, upside might be limited; "REACHED" signals a potential reversal or exhaustion.
Use target lines as visual S/R levels; they auto-start at session open and halt at close.
Combine with price action, volume, or other indicators for entries (e.g., buy near down target if bullish bias).
Example Scenario:
Forex (GBPUSD, 1-min): Set session to "London Kill Zone: 02:00-05:00" (UTC+0), multiplier=10000. Table shows pips; lines mark expected highs/lows.
Limitations and Tips
Historical Data Limits: Averages are capped by TradingView's bar history (e.g., ~14 days on 1-min for free plans). Upgrade for deeper look backs or use higher timeframes.
Session Accuracy: Ensure UTC offset matches your chartโtest with the "In Session" plot (enable in Style tab, zoom y-axis if columns are tiny).
No Alerts/Signals: Purely informational; add custom alerts via TradingView for "REACHED" conditions.
Performance: On very low timeframes with long sessions, lines might consume line limits (max ~50)โtoggle off if needed.
Tips: For crypto/forex, experiment with multiplier to match your preferred units (e.g., points vs. decimals). Hide debug plot in Style tab for clean charts. If "REACHED" doesn't trigger, verify on historical data where moves exceed averages.
This tool draws from concepts like Average Daily Range but focuses on directional, session-specific volatility for precise intraday decision-making. Feedback welcome!
Disclaimer
This indicator is for educational purposes only and does not constitute financial advice. Always consult a professional before trading.
Smart Money Breakout Channels [AlgoAlpha]๐ OVERVIEW
This script draws breakout detection zones called โSmart Money Breakout Channelsโ based on volatility-normalized price movement and visualizes them as dynamic boxes with volume overlays. It identifies temporary accumulation or distribution ranges using a custom normalized volatility metric and tracks when price breaks out of those zonesโeither upward or downward. Each channel represents a structured range where smart money may be active, helping traders anticipate key breakouts with added context from volume delta, up/down volume, and a visual gradient gauge for momentum bias.
๐ CONCEPTS
The script calculates normalized price volatility by measuring the standard deviation of price mapped to a scale using the highest and lowest prices over a set lookback period. When normalized volatility reaches a local low and flips upward, a boxed channel is drawn between the highest and lowest prices in that zone. These boxes persist until price breaks out, either with a strong candle close (configurable) or by touching the boundary. Volume analysis enhances interpretation by rendering delta bars inside the box, showing volume distribution during the channel. Additionally, a real-time visual โgaugeโ shows where volume delta sits within the channel range, helping users spot pressure imbalances.
๐ FEATURES
Automatic detection and drawing of breakout channels based on volatility-normalized price pivots.
Optional nested channels to allow multiple simultaneous zones or a clean single-zone view.
Gradient-filled volume gauge with dynamic pointer to show current delta pressure within the box.
Three volume visualization modes: raw volume, comparative up/down volume, and delta.
Alerts for new channel creation and confirmed bullish or bearish breakouts.
๐ USAGE
Apply the indicator to any chart. Wait for a new breakout box to formโthis occurs when volatility behavior shifts and a stable range emerges. Once a box appears, monitor price relative to its boundaries. A breakout above suggests bullish continuation, below suggests bearish continuation; signals are stronger when โStrong Closes Onlyโ is enabled.
Watch the internal volume candles to understand where buy/sell pressure is concentrated during the box. Use the gauge on the right to interpret whether net pressure is building upward or downward before breakout to anticipate the direction.
Use alerts to catch breakout events without needing to monitor the chart constantly ๐จ.
52SIGNAL RECIPE Coinbase Institutional Smart Money DetectorCoinbase Institutional Smart Money Detector
โ Overview
Coinbase Institutional Smart Money Detector is an innovative indicator that detects the buying and selling movements of institutional investors through Coinbase Prime in real-time. This powerful tool tracks the flow of funds from large institutions to provide valuable signals before significant market direction changes occur. It can be applied to Bitcoin charts on any exchange, allowing traders to follow the "smart money" movements of institutions anytime, anywhere.
The unique strength of this indicator lies in its comprehensive assessment of institutional investors' consecutive trading behaviors, volume patterns, and trend strength by analyzing Coinbase data in real-time. By providing clear visual representation of institutional fund flow data that is difficult for ordinary traders to access, you gain the opportunity to move alongside the big players in the market.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Key Features
โข Coinbase Prime Data Analysis: Tracks institutional movements in real-time by analyzing data from Coinbase Prime, an institutional-only service
โข Real-time Institutional Fund Flow Monitoring: Immediately detects large institutions' spot buying/selling activities, allowing positioning ahead of the market
โข Universal Exchange Compatibility: Applicable to Bitcoin charts on any exchange, enabling use on your preferred trading platform
โข Institutional Continuity Analysis: Identifies continuous institutional activity by tracking consecutive buying/selling patterns
โข Smart Volume Analysis: Detects increased volume compared to averages and analyzes key trading time periods
โข Trend Strength Measurement: Quantifies and displays the strength of upward/downward trends by analyzing candle patterns
โข Intuitive Visualization: Clearly marks institutional activity points on charts through bar coloring and labels
โข Real-time Strength Display: Calculates and displays current trend strength in a table in real-time
โข Customizable Settings: Allows customization of key parameters to match your trading style
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Understanding Signal Types
โ Institutional Buy Signal
โข Definition: Occurs when institutional investors show consecutive buying activity through Coinbase Prime, accompanied by increased volume and strong upward trend
โข Visual Representation: Translucent blue bar coloring and "Institution Buying Detected!" label on the candle where the buy signal occurs
โข Market Interpretation: Indicates that institutional investors are actively buying spot Bitcoin, which is likely to lead to price increases
โข Signal Strength Factors:
โถ Consecutive price increase patterns
โถ Above-average volume
โถ Strong upward trend strength measurement
โถ Significant price movement
โ Institutional Sell Signal
โข Definition: Occurs when institutional investors show consecutive selling activity through Coinbase Prime, accompanied by increased volume and strong downward trend
โข Visual Representation: Translucent pink bar coloring and "Institution Selling Detected!" label on the candle where the sell signal occurs
โข Market Interpretation: Indicates that institutional investors are actively selling spot Bitcoin, which is likely to lead to price decreases
โข Signal Strength Factors:
โถ Consecutive price decrease patterns
โถ Above-average volume
โถ Strong downward trend strength measurement
โถ Significant price movement
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Understanding Trend Strength
โ Trend Strength Measurement Method
โข Definition: Measures trend strength by analyzing the ratio of up/down candles over a recent period
โข Visual Representation: Displayed in the table as "BULL STRENGTH" or "BEAR STRENGTH" with percentage value and "STRONG" or "WEAK" status
โข Strength Threshold: Strong/weak determination according to user-configurable threshold
โข Calculation Method:
โถ Upward trend strength = (Number of upward candles) / (Total analysis period)
โถ Downward trend strength = (Number of downward candles) / (Total analysis period)
โถ Displayed as "STRONG" when strength is above threshold, "WEAK" when below
โ Utilizing Trend Strength
โข Signal Filtering: Generates signals only when trend strength is strong, reducing false signals
โข Trend Confirmation: Evaluates the health and sustainability of the current market trend
โข Entry/Exit Decisions: Consider entering in strong trends and exiting when trends weaken
โข Risk Management: Develop strategies to reduce position size in weak trends and increase in strong trends
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Practical Trading Applications
โ Institutional Buy Signal Strategy
โข Trend Reversal Scenario:
โถ Setup: Strong institutional buy signal during a downtrend
โถ Entry: Buy after signal confirmation in the next candle
โถ Stop Loss: Below the low of the signal candle
โถ Take Profit: When reaching previous major resistance or when trend strength weakens
โข Trend Continuation Scenario:
โถ Setup: Institutional buy signal after correction in an uptrend
โถ Entry: Buy after signal confirmation
โถ Stop Loss: Below recent major low
โถ Take Profit: Gradually take profits considering trend strength
โ Institutional Sell Signal Strategy
โข Trend Reversal Scenario:
โถ Setup: Strong institutional sell signal during an uptrend
โถ Entry: Sell after signal confirmation in the next candle
โถ Stop Loss: Above the high of the signal candle
โถ Take Profit: When reaching previous major support or when trend strength weakens
โข Trend Continuation Scenario:
โถ Setup: Institutional sell signal after bounce in a downtrend
โถ Entry: Sell after signal confirmation
โถ Stop Loss: Above recent major high
โถ Take Profit: Gradually take profits considering trend strength
โ Multi-Timeframe Approach
โข Higher Timeframe Direction Confirmation:
โถ Check institutional signals and trend strength on daily/4-hour charts
โถ Use for setting main trading direction
โข Lower Timeframe Entry Point Finding:
โถ Wait for lower timeframe signals that align with higher timeframe direction
โถ Use for capturing precise entry points
โข Cross-Timeframe Signal Alignment:
โถ Signal strength increases when signals occur in the same direction across multiple timeframes
โถ Capture high-probability trading opportunities
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Indicator Settings Guide
โ Main Setting Parameters
โข Institutional Continuity Period:
โถ Purpose: Sets the period to check institutional consecutive buying/selling activity
โถ Lower value: Generates more signals, increases responsiveness
โถ Higher value: Reduces number of signals, increases reliability
โข Trend Strength Threshold:
โถ Purpose: Sets the minimum threshold for determining strong trends
โถ Lower value: More signals, less filtering
โถ Higher value: Generates signals only in stronger trends, higher filtering
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Synergy with Other Indicators
โข Support/Resistance Levels:
โถ Institutional signals occurring at key support/resistance levels have higher probability
โถ Combination of key technical analysis levels and institutional activity provides powerful signals
โข Moving Averages:
โถ Pay attention to institutional signals near key moving averages (50MA, 200MA)
โถ Strong trend change possibility when moving average crossovers coincide with institutional signals
โข RSI/Momentum Indicators:
โถ Institutional buy signals in oversold conditions increase reversal probability
โถ Institutional sell signals in overbought conditions increase reversal probability
โข Volume Profile:
โถ Institutional signals at high volume nodes confirm important price levels
โถ Institutional activity in key trading areas greatly impacts price direction
โข Market Structure:
โถ Institutional signals near key market structures (higher highs/lows, lower highs/lows) suggest structural changes
โถ Coincidence of market structure changes and institutional activity indicates important trend turning points
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Conclusion
Coinbase Institutional Smart Money Detector provides traders with valuable insights by tracking spot Bitcoin trading activities of institutional investors through Coinbase Prime in real-time. Because it can be applied to Bitcoin charts on any exchange, you can utilize it immediately on your preferred trading platform.
The core value of this indicator is providing intuitive visualization of institutional fund flow data that is difficult for ordinary traders to access. By comprehensively analyzing consecutive price movements, volume increases, and trend strength to capture institutional activity, you gain the opportunity to move alongside the big players in the market.
Clear buy/sell signals based on Coinbase Prime data and real-time trend strength measurements help traders quickly grasp market conditions and make strategic decisions. By integrating this powerful tool into your trading strategy, secure a competitive edge to understand where the market's smart money is flowing and position accordingly.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โป Disclaimer: Like all trading tools, the Institutional Smart Money Detector should be used as a supplementary indicator and not relied upon exclusively for trading decisions. Past patterns of institutional behavior may not guarantee future market movements. Always employ appropriate risk management strategies in your trading.
Coinbase Institutional Smart Money Detector
โ ๊ฐ์
Coinbase Institutional Smart Money Detector๋ ์ฝ์ธ๋ฒ ์ด์ค ํ๋ผ์(Coinbase Prime)์ ํตํ ๊ธฐ๊ด ํฌ์์๋ค์ ํ๋ฌผ ๋นํธ์ฝ์ธ ๋งค์/๋งค๋ ์์ง์์ ์ค์๊ฐ์ผ๋ก ๊ฐ์งํ๋ ํ์ ์ ์ธ ์งํ์
๋๋ค. ์ด ๊ฐ๋ ฅํ ๋๊ตฌ๋ ๋ํ ๊ธฐ๊ด๋ค์ ์๊ธ ํ๋ฆ์ ์ถ์ ํ์ฌ ์ค์ํ ์์ฅ ๋ฐฉํฅ ์ ํ์ด ์ผ์ด๋๊ธฐ ์ ์ ๊ท์คํ ์ ํธ๋ฅผ ์ ๊ณตํฉ๋๋ค. ์ด๋ค ๊ฑฐ๋์์ ๋นํธ์ฝ์ธ ์ฐจํธ์๋ ์ ์ฉ ๊ฐ๋ฅํ์ฌ ํธ๋ ์ด๋๋ค์ด ์ธ์ ์ด๋์๋ ๊ธฐ๊ด์ "์ค๋งํธ ๋จธ๋" ์์ง์์ ๋ฐ๋ผ๊ฐ ์ ์๊ฒ ํด์ค๋๋ค.
์ด ์งํ์ ๋
๋ณด์ ์ธ ๊ฐ์ ์ ์ฝ์ธ๋ฒ ์ด์ค ๋ฐ์ดํฐ๋ฅผ ์ค์๊ฐ์ผ๋ก ๋ถ์ํ์ฌ ๊ธฐ๊ด ํฌ์์๋ค์ ์ฐ์์ ์ธ ๋งค๋งค ํ๋, ๊ฑฐ๋๋ ํจํด, ๊ทธ๋ฆฌ๊ณ ์ถ์ธ ๊ฐ๋๋ฅผ ์ข
ํฉ์ ์ผ๋ก ํ๊ฐํ๋ค๋ ์ ์
๋๋ค. ์ผ๋ฐ ํธ๋ ์ด๋๋ค์ด ์ ๊ทผํ๊ธฐ ์ด๋ ค์ด ๊ธฐ๊ด ์๊ธ ํ๋ฆ ๋ฐ์ดํฐ๋ฅผ ์๊ฐ์ ์ผ๋ก ๋ช
ํํ๊ฒ ์ ๊ณตํจ์ผ๋ก์จ, ์ฌ๋ฌ๋ถ์ ์์ฅ์ ํฐ ์๋ค๊ณผ ํจ๊ป ์์ง์ผ ์ ์๋ ๊ธฐํ๋ฅผ ์ป๊ฒ ๋ฉ๋๋ค.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ์ฃผ์ ํน์ง
โข ์ฝ์ธ๋ฒ ์ด์ค ํ๋ผ์ ๋ฐ์ดํฐ ๋ถ์: ๊ธฐ๊ด ์ ์ฉ ์๋น์ค์ธ ์ฝ์ธ๋ฒ ์ด์ค ํ๋ผ์์ ๋ฐ์ดํฐ๋ฅผ ์ค์๊ฐ์ผ๋ก ์ถ์ ํ์ฌ ๊ธฐ๊ด์ ์์ง์ ํฌ์ฐฉ
โข ์ค์๊ฐ ๊ธฐ๊ด ์๊ธ ํ๋ฆ ๋ชจ๋ํฐ๋ง: ๋ํ ๊ธฐ๊ด๋ค์ ํ๋ฌผ ๋งค์/๋งค๋ ํ๋์ ์ฆ๊ฐ์ ์ผ๋ก ๊ฐ์งํ์ฌ ์์ฅ์ ์์ ํฌ์ง์
๋ ๊ฐ๋ฅ
โข ๋ชจ๋ ๊ฑฐ๋์ ํธํ์ฑ: ์ด๋ค ๊ฑฐ๋์์ ๋นํธ์ฝ์ธ ์ฐจํธ์๋ ์ ์ฉ ๊ฐ๋ฅํ์ฌ ์ ํธํ๋ ํธ๋ ์ด๋ฉ ํ๋ซํผ์์ ํ์ฉ ๊ฐ๋ฅ
โข ๊ธฐ๊ด ์ฐ์์ฑ ๋ถ์: ์ฐ์์ ์ธ ๋งค์/๋งค๋ ํจํด์ ์ถ์ ํ์ฌ ๊ธฐ๊ด์ ์ง์์ ์ธ ํ๋ ์๋ณ
โข ์ค๋งํธ ๋ณผ๋ฅจ ๋ถ์: ํ๊ท ๋๋น ๊ฑฐ๋๋ ์ฆ๊ฐ๋ฅผ ๊ฐ์งํ๊ณ ์ฃผ์ ๊ฑฐ๋ ์๊ฐ๋๋ฅผ ๋ถ์
โข ์ถ์ธ ๊ฐ๋ ์ธก์ : ์บ๋ค ํจํด์ ๋ถ์ํด ์์น/ํ๋ฝ ์ถ์ธ์ ๊ฐ๋๋ฅผ ์์นํํ์ฌ ํ์
โข ์ง๊ด์ ์๊ฐํ: ๋ฐ ์ปฌ๋ฌ๋ง๊ณผ ๋ผ๋ฒจ์ ํตํด ๊ธฐ๊ด ํ๋ ์ง์ ์ ์ฐจํธ์ ๋ช
ํํ๊ฒ ํ์
โข ์ค์๊ฐ ๊ฐ๋ ํ์: ํ์ฌ ์ถ์ธ์ ๊ฐ๋๋ฅผ ์ค์๊ฐ์ผ๋ก ๊ณ์ฐํ์ฌ ํ
์ด๋ธ์ ํ์
โข ์ฌ์ฉ์ ์ ์ ์ค์ : ์ฃผ์ ๋งค๊ฐ๋ณ์๋ฅผ ์กฐ์ ํ์ฌ ์์ ์ ํธ๋ ์ด๋ฉ ์คํ์ผ์ ๋ง๊ฒ ์ปค์คํฐ๋ง์ด์ง ๊ฐ๋ฅ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ์ ํธ ์ ํ ์ดํดํ๊ธฐ
โ ๊ธฐ๊ด ๋งค์ ์ ํธ
โข ์ ์: ์ฝ์ธ๋ฒ ์ด์ค ํ๋ผ์์ ํตํด ๊ธฐ๊ด ํฌ์์๋ค์ด ์ฐ์์ ์ธ ๋งค์ ํ๋์ ๋ณด์ด๋ฉฐ, ์ด์ ํจ๊ป ๊ฑฐ๋๋ ์ฆ๊ฐ์ ๊ฐํ ์์น ์ถ์ธ๊ฐ ๋ํ๋ ๋ ๋ฐ์
โข ์๊ฐ์ ํํ: ๋งค์ ์ ํธ๊ฐ ๋ฐ์ํ ์บ๋ค์ ๋ฐํฌ๋ช
ํ๋์ ๋ฐ ์ปฌ๋ฌ๋ง๊ณผ ํจ๊ป "Institution Buying Detected!" ๋ผ๋ฒจ ํ์
โข ์์ฅ ํด์: ๊ธฐ๊ด ํฌ์์๋ค์ด ์ ๊ทน์ ์ผ๋ก ํ๋ฌผ ๋นํธ์ฝ์ธ์ ๋งค์ํ๊ณ ์์ผ๋ฉฐ, ์ด๋ ๊ณง ๊ฐ๊ฒฉ ์์น์ผ๋ก ์ด์ด์ง ๊ฐ๋ฅ์ฑ์ด ๋์์ ์๋ฏธ
โข ์ ํธ ๊ฐ๋ ์์:
โถ ์ฐ์์ ์ธ ๊ฐ๊ฒฉ ์์น ํจํด
โถ ํ๊ท ๋ณด๋ค ๋์ ๊ฑฐ๋๋
โถ ๊ฐํ ์์น ์ถ์ธ ๊ฐ๋ ์ธก์ ๊ฐ
โถ ์ ์๋ฏธํ ๊ฐ๊ฒฉ ๋ณ๋
โ ๊ธฐ๊ด ๋งค๋ ์ ํธ
โข ์ ์: ์ฝ์ธ๋ฒ ์ด์ค ํ๋ผ์์ ํตํด ๊ธฐ๊ด ํฌ์์๋ค์ด ์ฐ์์ ์ธ ๋งค๋ ํ๋์ ๋ณด์ด๋ฉฐ, ์ด์ ํจ๊ป ๊ฑฐ๋๋ ์ฆ๊ฐ์ ๊ฐํ ํ๋ฝ ์ถ์ธ๊ฐ ๋ํ๋ ๋ ๋ฐ์
โข ์๊ฐ์ ํํ: ๋งค๋ ์ ํธ๊ฐ ๋ฐ์ํ ์บ๋ค์ ๋ฐํฌ๋ช
๋ถํ์ ๋ฐ ์ปฌ๋ฌ๋ง๊ณผ ํจ๊ป "Institution Selling Detected!" ๋ผ๋ฒจ ํ์
โข ์์ฅ ํด์: ๊ธฐ๊ด ํฌ์์๋ค์ด ์ ๊ทน์ ์ผ๋ก ํ๋ฌผ ๋นํธ์ฝ์ธ์ ๋งค๋ํ๊ณ ์์ผ๋ฉฐ, ์ด๋ ๊ณง ๊ฐ๊ฒฉ ํ๋ฝ์ผ๋ก ์ด์ด์ง ๊ฐ๋ฅ์ฑ์ด ๋์์ ์๋ฏธ
โข ์ ํธ ๊ฐ๋ ์์:
โถ ์ฐ์์ ์ธ ๊ฐ๊ฒฉ ํ๋ฝ ํจํด
โถ ํ๊ท ๋ณด๋ค ๋์ ๊ฑฐ๋๋
โถ ๊ฐํ ํ๋ฝ ์ถ์ธ ๊ฐ๋ ์ธก์ ๊ฐ
โถ ์ ์๋ฏธํ ๊ฐ๊ฒฉ ๋ณ๋
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ์ถ์ธ ๊ฐ๋ ์ดํดํ๊ธฐ
โ ์ถ์ธ ๊ฐ๋ ์ธก์ ๋ฐฉ์
โข ์ ์: ์ต๊ทผ ์ผ์ ๊ธฐ๊ฐ ๋์์ ์์น/ํ๋ฝ ์บ๋ค ๋น์จ์ ๋ถ์ํ์ฌ ์ถ์ธ์ ๊ฐ๋๋ฅผ ์ธก์
โข ์๊ฐ์ ํํ: ํ
์ด๋ธ์ "BULL STRENGTH" ๋๋ "BEAR STRENGTH"๋ก ํ์๋๋ฉฐ, ๋ฐฑ๋ถ์จ ๊ฐ๊ณผ ํจ๊ป "STRONG" ๋๋ "WEAK" ์ํ ํ์
โข ๊ฐ๋ ์๊ณ๊ฐ: ์ฌ์ฉ์๊ฐ ์ค์ ๊ฐ๋ฅํ ์๊ณ๊ฐ์ ๋ฐ๋ผ ๊ฐํจ/์ฝํจ ํ์
โข ๊ณ์ฐ ๋ฐฉ์:
โถ ์์น ์ถ์ธ ๊ฐ๋ = (์์น ์บ๋ค ์) / (์ ์ฒด ๋ถ์ ๊ธฐ๊ฐ)
โถ ํ๋ฝ ์ถ์ธ ๊ฐ๋ = (ํ๋ฝ ์บ๋ค ์) / (์ ์ฒด ๋ถ์ ๊ธฐ๊ฐ)
โถ ๊ฐ๋๊ฐ ์๊ณ๊ฐ ์ด์์ผ ๋ "STRONG", ๋ฏธ๋ง์ผ ๋ "WEAK"๋ก ํ์
โ ์ถ์ธ ๊ฐ๋์ ํ์ฉ
โข ์ ํธ ํํฐ๋ง: ์ถ์ธ ๊ฐ๋๊ฐ ๊ฐํ ๋๋ง ์ ํธ๋ฅผ ์์ฑํ์ฌ ํ์ ์ ํธ ๊ฐ์
โข ์ถ์ธ ํ์ธ: ํ์ฌ ์์ฅ ์ถ์ธ์ ๊ฑด์ ์ฑ๊ณผ ์ง์ ๊ฐ๋ฅ์ฑ ํ๊ฐ
โข ์ง์
/ํด์ถ ๊ฒฐ์ : ๊ฐํ ์ถ์ธ์์ ์ง์
ํ๊ณ ์ฝํ ์ถ์ธ๋ก ์ ํ๋ ๋ ํด์ถ ๊ณ ๋ ค
โข ๋ฆฌ์คํฌ ๊ด๋ฆฌ: ์ฝํ ์ถ์ธ์์๋ ํฌ์ง์
ํฌ๊ธฐ๋ฅผ ์ค์ด๊ณ , ๊ฐํ ์ถ์ธ์์๋ ๋๋ฆฌ๋ ์ ๋ต ์๋ฆฝ ๊ฐ๋ฅ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ์ค์ ํธ๋ ์ด๋ฉ ์์ฉ
โ ๊ธฐ๊ด ๋งค์ ์ ํธ ํ์ฉ ์ ๋ต
โข ์ถ์ธ ์ ํ ์๋๋ฆฌ์ค:
โถ ์ค์ : ํ๋ฝ ์ถ์ธ ์ค ๊ฐํ ๊ธฐ๊ด ๋งค์ ์ ํธ ๋ฐ์
โถ ์ง์
: ์ ํธ ํ์ธ ํ ๋ค์ ์บ๋ค์์ ๋งค์
โถ ์์ : ์ ํธ ์บ๋ค์ ์ ์ ์๋
โถ ์ด์ต์คํ: ์ด์ ์ฃผ์ ์ ํญ์ ๋๋ฌ ์ ๋๋ ์ถ์ธ ๊ฐ๋๊ฐ ์ฝํด์ง ๋
โข ์ถ์ธ ์ง์ ์๋๋ฆฌ์ค:
โถ ์ค์ : ์์น ์ถ์ธ ์ค ์กฐ์ ํ ๊ธฐ๊ด ๋งค์ ์ ํธ ๋ฐ์
โถ ์ง์
: ์ ํธ ํ์ธ ํ ๋งค์
โถ ์์ : ์ต๊ทผ ์ฃผ์ ์ ์ ์๋
โถ ์ด์ต์คํ: ์ถ์ธ ๊ฐ๋๋ฅผ ๊ณ ๋ คํ์ฌ ๋จ๊ณ์ ์ผ๋ก ์ด์ต์คํ
โ ๊ธฐ๊ด ๋งค๋ ์ ํธ ํ์ฉ ์ ๋ต
โข ์ถ์ธ ์ ํ ์๋๋ฆฌ์ค:
โถ ์ค์ : ์์น ์ถ์ธ ์ค ๊ฐํ ๊ธฐ๊ด ๋งค๋ ์ ํธ ๋ฐ์
โถ ์ง์
: ์ ํธ ํ์ธ ํ ๋ค์ ์บ๋ค์์ ๋งค๋
โถ ์์ : ์ ํธ ์บ๋ค์ ๊ณ ์ ์
โถ ์ด์ต์คํ: ์ด์ ์ฃผ์ ์ง์ง์ ๋๋ฌ ์ ๋๋ ์ถ์ธ ๊ฐ๋๊ฐ ์ฝํด์ง ๋
โข ์ถ์ธ ์ง์ ์๋๋ฆฌ์ค:
โถ ์ค์ : ํ๋ฝ ์ถ์ธ ์ค ๋ฐ๋ฑ ํ ๊ธฐ๊ด ๋งค๋ ์ ํธ ๋ฐ์
โถ ์ง์
: ์ ํธ ํ์ธ ํ ๋งค๋
โถ ์์ : ์ต๊ทผ ์ฃผ์ ๊ณ ์ ์
โถ ์ด์ต์คํ: ์ถ์ธ ๊ฐ๋๋ฅผ ๊ณ ๋ คํ์ฌ ๋จ๊ณ์ ์ผ๋ก ์ด์ต์คํ
โ ๋ค์ค ์๊ฐํ๋ ์ ์ ๊ทผ๋ฒ
โข ์์ ์๊ฐํ๋ ์ ๋ฐฉํฅ์ฑ ํ์ธ:
โถ ์ผ๋ด/4์๊ฐ๋ด์์ ๊ธฐ๊ด ์ ํธ ๋ฐ ์ถ์ธ ๊ฐ๋ ํ์ธ
โถ ์ฃผ ํธ๋ ์ด๋ฉ ๋ฐฉํฅ ์ค์ ์ ํ์ฉ
โข ํ์ ์๊ฐํ๋ ์ ์ง์
์ ์ฐพ๊ธฐ:
โถ ์์ ์๊ฐํ๋ ์ ๋ฐฉํฅ๊ณผ ์ผ์นํ๋ ํ์ ์๊ฐํ๋ ์ ์ ํธ ๋๊ธฐ
โถ ์ ๋ฐํ ์ง์
์ ํฌ์ฐฉ์ ํ์ฉ
โข ์๊ฐํ๋ ์ ๊ฐ ์ ํธ ์ผ์น ํ์ธ:
โถ ์ฌ๋ฌ ์๊ฐํ๋ ์์์ ๋์ผํ ๋ฐฉํฅ์ ์ ํธ๊ฐ ๋ฐ์ํ ๋ ์ ํธ ๊ฐ๋ ์ฆ๊ฐ
โถ ๋์ ํ๋ฅ ์ ํธ๋ ์ด๋ฉ ๊ธฐํ ํฌ์ฐฉ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ์งํ ์ค์ ๊ฐ์ด๋
โ ์ฃผ์ ์ค์ ๋งค๊ฐ๋ณ์
โข Institutional Continuity Period (๊ธฐ๊ด ์ฐ์์ฑ ํ์ธ ๊ธฐ๊ฐ):
โถ ๋ชฉ์ : ๊ธฐ๊ด์ ์ฐ์์ ์ธ ๋งค์/๋งค๋ ํ๋์ ํ์ธํ ๊ธฐ๊ฐ ์ค์
โถ ๋ฎ์ ๊ฐ: ๋ ๋ง์ ์ ํธ ์์ฑ, ๋ฐ์์ฑ ์ฆ๊ฐ
โถ ๋์ ๊ฐ: ์ ํธ ์ ๊ฐ์, ์ ๋ขฐ์ฑ ์ฆ๊ฐ
โข Trend Strength Threshold (์ถ์ธ ๊ฐ๋ ์๊ณ๊ฐ):
โถ ๋ชฉ์ : ์ถ์ธ๊ฐ ๊ฐํ๋ค๊ณ ํ๋จํ ์ต์ ์๊ณ๊ฐ ์ค์
โถ ๋ฎ์ ๊ฐ: ๋ ๋ง์ ์ ํธ, ๋ฎ์ ํํฐ๋ง
โถ ๋์ ๊ฐ: ๋ ๊ฐํ ์ถ์ธ์์๋ง ์ ํธ ์์ฑ, ๋์ ํํฐ๋ง
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๋ค๋ฅธ ์งํ์์ ์๋์ง
โข ์ง์ง/์ ํญ ๋ ๋ฒจ:
โถ ์ฃผ์ ์ง์ง/์ ํญ ๋ ๋ฒจ์์ ๋ฐ์ํ๋ ๊ธฐ๊ด ์ ํธ๋ ํ๋ฅ ์ด ๋ ๋์
โถ ๊ธฐ์ ์ ๋ถ์์ ํต์ฌ ๋ ๋ฒจ๊ณผ ๊ธฐ๊ด ํ๋์ ๊ฒฐํฉ์ ๊ฐ๋ ฅํ ์๊ทธ๋ ์ ๊ณต
โข ์ด๋ํ๊ท ์ :
โถ ์ฃผ์ ์ด๋ํ๊ท ์ (50MA, 200MA) ๊ทผ์ฒ์์ ๋ฐ์ํ๋ ๊ธฐ๊ด ์ ํธ ์ฃผ๋ชฉ
โถ ์ด๋ํ๊ท ์ ๋ํ์ ๊ธฐ๊ด ์ ํธ๊ฐ ์ผ์นํ ๋ ๊ฐํ ์ถ์ธ ๋ณํ ๊ฐ๋ฅ์ฑ
โข RSI/๋ชจ๋ฉํ
์งํ:
โถ ๊ณผ๋งค์/๊ณผ๋งค๋ ์ํ์์ ๋ฐ์ํ๋ ๊ธฐ๊ด ์ ํธ๋ ๋ฐ์ ๊ฐ๋ฅ์ฑ ๋์
โถ ๋ชจ๋ฉํ
๋ค์ด๋ฒ์ ์ค์ ๊ธฐ๊ด ์ ํธ์ ์ผ์น๋ ๊ฐ๋ ฅํ ๋ฐ์ ์ ํธ
โข ๋ณผ๋ฅจ ํ๋กํ์ผ:
โถ ๋์ ๋ณผ๋ฅจ ๋
ธ๋์์ ๋ฐ์ํ๋ ๊ธฐ๊ด ์ ํธ๋ ์ค์ํ ๊ฐ๊ฒฉ ๋ ๋ฒจ ํ์ธ
โถ ์ฃผ์ ๊ฑฐ๋ ์์ญ์์์ ๊ธฐ๊ด ํ๋์ ๊ฐ๊ฒฉ ๋ฐฉํฅ์ ํฐ ์ํฅ ๋ฏธ์นจ
โข ์์ฅ ๊ตฌ์กฐ:
โถ ์ฃผ์ ์์ฅ ๊ตฌ์กฐ(๋์ ๊ณ ์ /์ ์ , ๋ฎ์ ๊ณ ์ /์ ์ ) ๊ทผ์ฒ์์ ๋ฐ์ํ๋ ๊ธฐ๊ด ์ ํธ๋ ๊ตฌ์กฐ ๋ณํ ์์
โถ ์์ฅ ๊ตฌ์กฐ ๋ณํ์ ๊ธฐ๊ด ํ๋์ ์ผ์น๋ ์ค์ํ ์ถ์ธ ์ ํ์ ํ์
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๊ฒฐ๋ก
Coinbase Institutional Smart Money Detector๋ ์ฝ์ธ๋ฒ ์ด์ค ํ๋ผ์์ ํตํ ๊ธฐ๊ด ํฌ์์๋ค์ ํ๋ฌผ ๋นํธ์ฝ์ธ ๊ฑฐ๋ ํ๋์ ์ค์๊ฐ์ผ๋ก ์ถ์ ํ์ฌ ํธ๋ ์ด๋๋ค์๊ฒ ๊ท์คํ ํต์ฐฐ๋ ฅ์ ์ ๊ณตํฉ๋๋ค. ์ด๋ค ๊ฑฐ๋์์ ๋นํธ์ฝ์ธ ์ฐจํธ์๋ ์ ์ฉ ๊ฐ๋ฅํ๊ธฐ ๋๋ฌธ์, ์ฌ๋ฌ๋ถ์ด ์ ํธํ๋ ํธ๋ ์ด๋ฉ ํ๋ซํผ์์ ๋ฐ๋ก ํ์ฉํ ์ ์์ต๋๋ค.
์ด ์งํ์ ํต์ฌ ๊ฐ์น๋ ์ผ๋ฐ ํธ๋ ์ด๋๋ค์ด ์ ๊ทผํ๊ธฐ ์ด๋ ค์ด ๊ธฐ๊ด ์๊ธ ํ๋ฆ ๋ฐ์ดํฐ๋ฅผ ์ง๊ด์ ์ผ๋ก ์๊ฐํํ์ฌ ์ ๊ณตํ๋ค๋ ์ ์
๋๋ค. ์ฐ์์ ์ธ ๊ฐ๊ฒฉ ์์ง์, ๊ฑฐ๋๋ ์ฆ๊ฐ, ๊ทธ๋ฆฌ๊ณ ์ถ์ธ ๊ฐ๋๋ฅผ ์ข
ํฉ์ ์ผ๋ก ๋ถ์ํ์ฌ ๊ธฐ๊ด์ ํ๋์ ํฌ์ฐฉํจ์ผ๋ก์จ, ์ฌ๋ฌ๋ถ์ ์์ฅ์ ํฐ ์๋ค๊ณผ ํจ๊ป ์์ง์ผ ์ ์๋ ๊ธฐํ๋ฅผ ์ป๊ฒ ๋ฉ๋๋ค.
์ฝ์ธ๋ฒ ์ด์ค ํ๋ผ์ ๋ฐ์ดํฐ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ ๋ช
ํํ ๋งค์/๋งค๋ ์ ํธ์ ์ค์๊ฐ ์ถ์ธ ๊ฐ๋ ์ธก์ ์ ํธ๋ ์ด๋๋ค์ด ์์ฅ ์ํฉ์ ํ๋์ ํ์
ํ๊ณ ์ ์ํ๊ฒ ์ ๋ต์ ๊ฒฐ์ ์ ๋ด๋ฆด ์ ์๊ฒ ๋์์ค๋๋ค. ์ด ๊ฐ๋ ฅํ ๋๊ตฌ๋ฅผ ์ฌ๋ฌ๋ถ์ ํธ๋ ์ด๋ฉ ์ ๋ต์ ํตํฉํจ์ผ๋ก์จ, ์์ฅ์ ์ค๋งํธ ๋จธ๋๊ฐ ์ด๋๋ก ํ๋ฌ๊ฐ๋์ง ํ์
ํ๊ณ ๊ทธ์ ๋ฐ๋ผ ํฌ์ง์
๋ํ ์ ์๋ ๊ฒฝ์ ์ฐ์๋ฅผ ํ๋ณดํ์ธ์.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โป ๋ฉด์ฑ
์กฐํญ: ๋ชจ๋ ํธ๋ ์ด๋ฉ ๋๊ตฌ์ ๋ง์ฐฌ๊ฐ์ง๋ก, Institutional Smart Money Detector๋ ๋ณด์กฐ ์งํ๋ก ์ฌ์ฉํด์ผ ํ๋ฉฐ ํธ๋ ์ด๋ฉ ๊ฒฐ์ ์ ์ ์ ์ผ๋ก ์์กดํด์๋ ์ ๋ฉ๋๋ค. ๊ณผ๊ฑฐ์ ๊ธฐ๊ด ํ๋ ํจํด์ด ๋ฏธ๋ ์์ฅ ์์ง์์ ๋ณด์ฅํ์ง๋ ์์ต๋๋ค. ํญ์ ์ ์ ํ ๋ฆฌ์คํฌ ๊ด๋ฆฌ ์ ๋ต์ ํธ๋ ์ด๋ฉ์ ํ์ฉํ์ธ์.






















